Creating binary packages without installing

I am experienced in creating packages on Debian machines. There one can create binary packages but on freebsd FreeBSD things are different. In FreeBSD I need to have ports installed first and then I can build binary packages from that.

My package contains a simple compiled program and 2-3 configuration files and I am searching to straight away build binary packages without building ports and then installing them and then building binary from that.

I found few articles related to something called manifest file. But nothing yet at my level of understanding on FreeBSD packaging.

In nutshell I am dumb on FreeBSD packaging and would need some guidance.
Thanks :)
 
Binary packages are result of ports building, you can not skip the building part. You can use make package on a port in the port directory, the port will be built and a package file created but won't be installed on the system. For example:

# make -C /usr/ports/devel/pcre package

After the build has finished the built package can be found at /usr/ports/packages.
 
Also can anyone explain me what http://lastsummer.de/creating-custom-packages-on-freebsd/ and https://blog.des.no/2013/08/creating-pkgng-packages-without-ports/ is trying to talk about. Here as far as my understanding they are claiming to create custom packages without ports.

You can ignore those for now, they are a very advanced work in progress way of creating pkg packages under very specific circumstances that don't apply to general porting for FreeBSD. With the ports(7) system you get all the manifests etc files automatically created by the system and you don't have to worry about them.
 
Thanks everyone. At present i I am following this approach :-

1) Create ports using quick porting
2) I will create package using make package way after that

I will post here again if i I will face any issue. Thanks for such quick help :)
 
You can ignore those for now, they are a very advanced work in progress way of creating pkg packages under very specific circumstances that don't apply to general porting for FreeBSD. With the ports(7) system you get all the manifests etc files automatically created by the system and you don't have to worry about them.
From the pkg help create man page I can see a full description of what is accomplished by the authors of those blogs. But still I have one question as to pkgng functionality: from the man pages it seems that listing the files to be included into a package (via plist or MANIFEST) is optional. The same I find in the porter's handbook. Am I to assume that pkg actually makes its own accounting of the files included in the package upon the creation of the package?
 
No. 'pkg create' run standalone will not automatically include any files from the metadatadir. You can see this if you put a skeletal +MANIFEST in your metadatadir and then run pkg create.

You need a 'files: {}' section in your +MANIFEST (or a plist, but I prefer to generate just one file that has everything).
 
Back
Top