CARDS 2.4.140
Package manager for the NuTyX GNU/Linux distribution
|
A port is a directory containing the files needed for building a package. The command pkgmk will be used to "build" the package, which can be installed afterwards.
This means that this directory must contain as a minimum a file named Pkgfile. The building of the package will be controlled by the contents of this file. It contains all the information necessary to compile and install the package from source.
The name port comes from the BSD world where a port refer to software "ported" to another operating system or platform. In our case, the port is simply the definitions for building a package.
The minimum information required for producing a binary are:
A little example with comments:
If you compare this example with an official NuTyX port, you can see that the official one contains more information. We will see this in the next paragraph. One line could catch you:
The syntax ${version%.*} allows us to substitute a variable of N digits for a variable of N-1 digits. It's often necessary for the sources of gnome packages. In our example, the line:
is identical to
since the variable version=2.6.4
If you want to make sure that the build bot is able to compile the package without any problems, it's important to specify all the dependencies needed for the compilation of the package. Dependencies starting from the NuTyX base are always included. Indeed the bot will always build the package by starting from a base NuTyX.
The array variable makedepends is used for this purpose. It defines all the needed dependencies for the compilation of the package. Dependencies are separated by a space.
You can try to build your first package