PUPPYPKG - noryb009/ppkg GitHub Wiki

A PUPPYPKG file is a file which includes a program's info and the commands needed to build it.

A PUPPYPKG template can be found here.

Variables

pkgname, pkgver, pkgrev, pkgdesc, and pkgcat hold the package's name, version, PUPPYPKG revision, package description, and category, respectively.

arch and notarch hold what architectures a package can or can not be built in. Only one of the two needs to be defined in the build script. If a package is architecture independent (like a bash script), then use arch=('any').

url holds the package's home page.

deps, makedeps and checkdeps holds a packages dependencies for normal users, making the package, and checking the package, respectively. These arrays can also have versions, for example: deps=( 'tar' 'bash>4.0' 'glibc>=2.14' 'linux=3.0' )

options holds options that a packages needs. These override the options in ppkg.conf. For example, if a package's binaries cannot be stipped, then you can use options=(-strip)

loc_EXE, loc_DEV, loc_DOC and loc_NLS point to where split package parts should go. These override the options in ppkg.conf. For example, if the package is a development package, you can include the DEV part in the EXE using loc_DEV='EXE'. If the package cannot be split, please use options=(-split) instead.

sources is an array of source files. The files can be remote (http://____) or local (patch_1.diff). Local sources are included in the pbuild, so try to use remote sources, but local patches.

md5sums is an array of the MD5 sums of the sources array. The arrays must be in the same order. To generate this field, use ppkg -g.

noextract is an array of source files that are .tar, .tar.gz, .tar.bz2, or .tar.xz files, but should not be extracted to $srcdir. Only include the name of the file, so if you havesources=( http://site.com/src.tar ), you would only need noextract=( src.tar ).

groups is an array of groups a package is in. Please do not use it unless you know what you are doing.

provides is an array of packages a package provides. For example, the package bash can use provides=( 'sh' ) to be seen by packages that need a shell.

conflicts is an array of packages that a package can not be installed with. For example, if firefox-git cannot be on the same system as firefox, then firefox-git would have conflicts=( 'firefox' ).

replaces is used to provide an upgrade path for packages that have been renamed. Please do not use it unless you know what you are doing.

Functions

build is a function that builds the package.

check is a function that runs any tests in a package to verify the build was successful.

package is a function that installs any files that should be in the package to $pkgdir.

afterSplit is a function that fixes any files that have been put into the wrong package. If a package requires a documentation file to run, then you can use mvSplit DOC EXE path/to/file

mvSplit is a support function that afterSplit() can use. It's syntax is: mvSplit fromPkg toPkg path/to/file [/path/to/file2] [/path/to/file3] [...]