Hello, I'm new to FreeBSD and I'm trying to port a piece of software.
Here is my use case: I have a FreeBSD box with one jail. I would like to build a piece of software on the main host (outside the jail), package it, and install it inside the jail as a package. I could compile it directly and install it in the jail's filesystem, but I thought I would make a port so that other people could benefit from it.
I wrote the
I'm also confused because I saw contradictions in the documentation, on the forums, and in the ports' makefiles. On one side, this post from 2016 says that
Also, the porter's handbook says "Make sure that
On the other hand,
Also, the
What would be the best way to accomplish what I described above? Thank you for your help!
Here is my use case: I have a FreeBSD box with one jail. I would like to build a piece of software on the main host (outside the jail), package it, and install it inside the jail as a package. I could compile it directly and install it in the jail's filesystem, but I thought I would make a port so that other people could benefit from it.
I wrote the
Makefile, pkg-plist, and so on. However, I'm a bit confused, because when I run make, it builds the software and runs the install target of the sub-makefile, even if I don't run make install. Also, when I run make stage, the files listed in pkg-plist don't appear in the work directory, and then make package complains that the files are not in work/stage/usr/local.I'm also confused because I saw contradictions in the documentation, on the forums, and in the ports' makefiles. On one side, this post from 2016 says that
make package will package a port without installing it (is this still up to date?).Also, the porter's handbook says "Make sure that
make package can be run as a normal user (that is, not as root).", which implies that the command doesn't install the port (since this cannot be done as a normal user).On the other hand,
/usr/ports/Mk/bsd.port.mk contains the following in the long comment at the beginning of the file:package - Create a package from an _installed_ port.Also, the
package-noinstall target exists, which suggests that package does indeed install the port. However this target is not documented.What would be the best way to accomplish what I described above? Thank you for your help!