src2pkg - trackinstall Copyright 2005-2008 Gilbert Ashley Note: src2pkg was formerly called PkgBuild. Starting with version-1.0 the name was changed to 'src2pkg' to avoid possible conflicts or confusion with other software. src2pkg is a system for creating installable Slackware-type '.tgz' packages from source code or other content, using a simple src2pkg script (really more like a spec file) or by using the command-line tools 'src2pkg' or 'trackinstall'. Both of these tools can also write a script for you, which can be easily customized with extra options or commands. For building packages from pre-compiled sources use the 'trackinstall' tool. It works pretty much like checkinstall, creating a package from content in the current directory. It can also easily create packages from the content created by running common installation scripts like 'install.sh',even if they are interactive scripts. For building most packages from source code, src2pkg is a better alternative as it lets you control and/or document the most common src2pkg options for the whole process. src2pkg can also work directly with SRPM packages. Decompression is handled by the program 'disrpm' which is installed in /usr/bin. It is not necessary to have rpm or rpm2cpio installed. src2pkg can also re-package binary packages such as binary RPM packages and Debian '.deb' archives. Decompression of Debian archives is also handled by disrpm, an excellent program written by . disrpm can even unpack some rpm's where rpm2tgz and rpm2cpio fail. This provides a much better conversion than using rpm2tgz for other reasons as well -src2pkg will check the directory and file permissions to make sure they are Slackware-compatible, move documents and man-pages into the proper directory for Slackware. It will even show you if you have all the required libraries installed on your system for running the program. It also provides a valid slack-desc file to insure that the package can be properly installed and removed using installpkg and removepkg. And it will do this for debian or other binary packages as well as rpm packages. (In fact, it will even repack a Slackware package! While that may sound silly, it makes it possible to easily unpack, verify and repackage possibly faulty packages that you download) After installing src2pkg, you can run 'src2pkg -h' and 'trackinstall -h', or 'man src2pkg' & 'man trackinstall' to see the options available. src2pkg can work with archives already on your system or, if given a valid URL, it will also download the source archive. In the same way, src2pkg can download and run a *.src2pkg script. src2pkg can also be used to update and/or execute existing .src2pkg or .PkgBuild scripts. src2pkg is able to configure and compile, or otherwise prepare, many different kinds of content for packaging. Heuristic methods are used to find the type of content and how to prepare it for packaging. These methods are based on experience with thousands of real cases so src2pkg is often able to successfully prepare content without any extra options or user-intervention. In the same way, src2pkg does many rigorous checks and performs corrections on the package content before creating the finished compressed package. This is all done automatically by default, but src2pkg will show prompts when these are done. Sometimes these prompts are labeled as warnings and show yellow-colored text, before performing the correction. If you don't like to use these features, or if they cause problems with a particular package, they can be disabled individually. For some packages, src2pkg uses a small library called libsentry for keeping track of which files and directories are created during the build. The src2pkg package which you install, contains the source code for this library which must be compiled before you can use src2pkg. We used to provide packages which contained this library in a pre-compiled form, but not any more. You must either let src2pkg compile these libraries itself during the installation process, or do it afterwards by running the command: 'src2pkg --setup' (You must be logged in as user 'root' to do this.) Doing it this way insures the library is fully compatible with your system -no matter which OS version, compiler/glibc version or achitecture you are running. It also provides a check to see that you have installed the basic programs needed for compiling source code. For more details, see the files HOWTO.txt and FAQ.txt in this directory. The code itself also has many comments which explain very technical aspects of src2pkg. The configuration file /etc/src2pkg/src2pkg.conf contains some useful notes for setting up certain preferences or for using src2pkg with architectures other than ix86.