This file briefly explains the purpose and use of special 'extra' files which are used by src2pkg or that src2pkg can create during package building.
Where $NAME is used, this means the bare case-sensitive name of the software being packaged. ( xprog != XProg )
The files are listed below in sections. First those files which are common to any package format -like patches. Then files which are specific to a certain package format are listed.
*.diff
*.diff.gz/bz2/lzma/xz
*.patch
*.patch.gz/bz2/lzma/xz
*.dpatch
patch and diff files are handled automatically if they are placed in the same directory where src2pkg is run from, or in specially-named sub-directories. They can be plain files or compressed files (*.gz, *.bz2, *.lzma or *.xz), or even debian *.dpatch files. Patches are applied automatically in 'natural' sort order. If you need to change the order of applying them, the easiest way is to rename them with numbers as the first part of the name 00-some.diff, 01-another.patch, etc. Patches whose names don't include 'patch', 'diff' or 'dpatch' can also be used, but src2pkg cannot automatically generate a PATCHLIST of them. Patches are applied at the end of the 'fix_source_perms' function, just before sources are configured by the 'configure_source' function.
Paths searched:CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
Some patch files(usually from debian) have the '.gz' ending, but are not really compressed files. These are correctly handled as uncompressed plain-text files. Patches will be detected automatically by src2pkg simply by placing them in the CWD (Current Working Directory) where src2pkg is run from, or in a subdir of the CWD. The subdir can be named Resources, patches or $NAME-patches (where NAME is the name of the package, of course). Once you have the build working correctly, you can create a .tar.gz or .tar.bz2 archive of the Resources, patches or $NAME-patches subdirectory to save space. src2pkg will automatically unzip the archive before applying the patches and will automatically remove the directory when finished if the -W or --cleanup option is used. Patches can also be placed in a separate PATCHES_DIR or PATCHES_DIR/NAME-patches PATCHES_DIR defaults to CWD.
$NAME-$VERSION-$ARCH-$BUILD$SIG.md5
md5sums can be automatically generated for your finished packaged if you desire, by uncommenting this line:
# CREATE_MD5_CHECKSUM=“YES”
in your /etc/src2pkg/src2pkg.conf file.
$NAME.src2pkg
$NAME.src2pkg.auto
When using -N or -A a src2pkg script is generated in CWD named $NAME.src2pkg.auto. Always change the name to simply $NAME.src2pkg to keep it from being overwritten. Running repeatedly using -N will clobber any *.src2pkg.auto already present. Running again using -A may update or edit an existing *.src2pkg.auto script. Scripts named without '.auto' have precedence when using -X to search for and run a script in the current directory. It's handy to always have a script for the build, even if no special code or extra instructions are needed for the build. In these cases, simply leaving the build script named $NAME.src2pkg.auto disinguishes it from the ones that *do* need extra code or options. If you are going to edit your build script, be sure to change the name first, to simply $NAME.src2pkg. That way it never gets clobbered (overwritten) and the name provides a visual clue so that just one look at the file tells you it contains something special.
$NAME.html
$NAME.xpm
$NAME.png
$NAME.svg
These items get automatically installed to DOC_DIR -usually PKG_DIR/usr/doc/$NAME-$VERSION or PKG_DIR/usr/share/doc/$NAME-$VERSION.
Images are searched for in the following locations:
SRC_DIR, CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
html pages are searched for in these locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
*.pc
These go to LIB_DIR/pkgconfig -usually: /usr/lib/pkgconfig or /usr/lib64/pkgconfig.
They are searched for in these locations:
SRC_DIR, CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
*.desktop
These go in DATA_DIR/applications -usually: /usr/share/applications
They are searched for in the following locations:
SRC_DIR, CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
src2pkg automatically adds a routine to the postinstall script (doinst.sh) for the package to update the desktop database when the package is installed.
xinitrc.*.new
xinitrc.*
Window Manager Xinitrc files are put in PKG_DIR/etc/X11/xinit and are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
rc.*
rc.*.new
'init' files for 'services' go to PKG_DIR/etc/rc.d. These get a routine written in doinst.sh which creates and entry in /etc/rc.d/rc.local for the new service, when the package is installed.
They are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
$NAME.conf
$NAME.conf.new
*.new
Any *.new files also get a routine written for them in doinst.sh which upgrades the file using the familiar config() function which keeps new configuration files in the package from overwriting files which you have customized for your system.
These are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
slack-desc
new.slack.desc
These are decription files which are inlcuded in the package and can actually have another name (like pkg-desc) by setting the PKG_DESC variable in your /etc/src2pkg/src2pkg.conf file. They can also be named non-generically to include the package name in the file name, using patterns like these:
$PKG_DESC-$NAME $PKG_DESC $NAME-$PKG_DESC $NAME.$PKG_DESC $NAME.txt
They are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
When using the -A or -N options to src2pkg, a generated slack-desc files gets copied to CWD/new.slack.desc unless a description file matching one of the name patterns shown above is already there. If you supply one it will be used, but only after verifying that there are 9-13 lines starting with '$NAME:'. Otherwise, one is always generated. Using -A only makes it get copied to CWD/new.slack-desc
These are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
doinst.sh
doinst.sh.gz
These get used as-is if they are present and can also be named using these alternate patterns:
doinst.sh-$NAME doinst.sh-$NAME.gz doinst.sh doinst.sh.gz $NAME-doinst.sh $NAME-doinst.sh.gz $NAME.doinst.sh $NAME.doinst.sh.gz
These are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
doinst.prepend
doinst.append
These files let you mix hard-coded routines with auto-generated link-creation routines. If you have hard-coded lines you want inserted in the doinst.sh script before the link-creation lines, put the code in doinst.prepend. If you want coded after the link-creation lines, use doinst.append.
These are searched for in the following locations:
CWD, PATCHES_DIR/NAME-patches, CWD/patches CWD/Resources
new.doinst.sh
When using -A, the new doinst.sh gets copied from the package to CWD/new.doinst.sh. By default, a doinst.sh gets created if needed and one is not already in the PKG_DIR or found in the search paths above.
slack-required
slack-supplies
These are used as-is if already present or can be generated if you use -E option to src2pkg. Generating these causes the creation of several temporary files, all in CWD, but they are removed before package building proceeds. If using the -A option, these get copied to the CWD if not already there.
slack-suggests
slack-conflicts
These must be manually created if you want them They can also have another name like pkg-suggests or pkg-conflicts which can be set by editing the /etc/src2pkg/src2pkg.conf file.
control
debian packages must contain a file named 'control' for use by the debian package manager. src2pkg will generate one for you if none is supplied. If you supply your own, simply place it in the CWD (the current working directory) to have it inserted in the package.
pinstall.sh
Puppy pet packages may contain a couple of extra files for use by the package manager. pinstall.sh files are post-installation scripts -funtionally equivalent to the Slackware doinst.sh scripts. since src2pkg already creates doinst.sh scripts when needed, these are simply renamed for placement in pet packages, unless a pinstall.sh script is found first.
$NAME.puppy.specs
puppy.specs
A 'specs' file should also be included in most pet packages. src2pkg will generate one for you, unless it finds one already in the CWD. These are named either 'puppy.specs' or '$NAME.puppy.specs' depending on the type of *.pet package being created. Newer versions of Puppy use simply 'puppy.specs' and the packages can be creates by using PKG_FORMAT=PET2 in your conf file, or by using the '-PET2' command-line option to src2pkg.