Minor fixups for the moment, still partially complete

This commit is contained in:
Aaron Griffin 2007-02-06 18:45:32 +00:00
parent c32a7fcc85
commit b726277ccc
1 changed files with 68 additions and 73 deletions

View File

@ -54,47 +54,6 @@ directory. \fBmakepkg\fR will check dependencies and look for the source files
required to build. If some are missing it will attempt to download them, required to build. If some are missing it will attempt to download them,
provided there is a fully-qualified URL in the \fIsource()\fR array. provided there is a fully-qualified URL in the \fIsource()\fR array.
.SS Install/Upgrade/Remove Scripting
Pacman has the ability to store and execute a package-specific script when it
installs, removes, or upgrades a package. This allows a package to "configure
itself" after installation and do the opposite right before it is removed.
The exact time the script is run varies with each operation:
.TP
.B pre_install
script is run right before files are extracted.
.TP
.B post_install
script is run right after files are extracted.
.TP
.B pre_upgrade
script is run right before files are extracted.
.TP
.B post_upgrade
script is run after files are extracted.
.TP
.B pre_remove
script is run right before files are removed.
.TP
.B post_remove
script is run right after files are removed.
.P
To use this feature, just create a file (eg, pkgname.install) and put it in
the same directory as the PKGBUILD script. Then use the \fIinstall\fR
directive:
install=pkgname.install
The install script does not need to be specified in the \fIsource\fR array.
A template install file is available in your ABS tree (/var/abs/install.proto).
.SH OPTIONS AND DIRECTIVES .SH OPTIONS AND DIRECTIVES
.TP .TP
.B pkgname .B pkgname
@ -114,11 +73,12 @@ maintainers to make updates to the package's configure flags, for example.
.B pkgdesc .B pkgdesc
This should be a brief description of the package and its functionality. This should be a brief description of the package and its functionality.
." Is this applicable below? ." Not entirely applicable, and we can do this better anyway. pacman does
.TP ." actuall support localized descriptions, though, but i don't think makepkg does.
.B pkgdesc_localized \fI(array)\fR ." .TP
Array of the localized package descriptions. The format is the following: ." .B pkgdesc_localized \fI(array)\fR
pkgdesc_localized=('xx_YY foo' 'xx_YY bar') ." Array of the localized package descriptions. The format is the following:
." pkgdesc_localized=('xx_YY foo' 'xx_YY bar')
.TP .TP
.B url .B url
@ -130,9 +90,9 @@ software being packaged. This is typically the project's website.
This field specifies the license(s) that apply to the package. Commonly-used This field specifies the license(s) that apply to the package. Commonly-used
licenses are typically found in \fI/usr/share/licenses/common\fR. If you licenses are typically found in \fI/usr/share/licenses/common\fR. If you
see the package's license there, simply reference it in the license field see the package's license there, simply reference it in the license field
(eg, \fBlicense="GPL"\fR). If the package provides a license not found in (eg, \fBlicense=("GPL")\fR). If the package provides a license not found in
\fI/usr/share/licenses/common\fR, then you should include the license in \fI/usr/share/licenses/common\fR, then you should include the license in
the package itself and set \fBlicense="custom"\fR or the package itself and set \fBlicense=("custom")\fR or
\fBlicense="custom:LicenseName"\fR. The license itself should be placed in a \fBlicense="custom:LicenseName"\fR. The license itself should be placed in a
directory called \fI$startdir/pkg/usr/share/licenses/$pkgname\fR. If multiple directory called \fI$startdir/pkg/usr/share/licenses/$pkgname\fR. If multiple
licenses are applied, use the array form: \fBlicenses=('GPL' 'FDL')\fR licenses are applied, use the array form: \fBlicenses=('GPL' 'FDL')\fR
@ -144,18 +104,19 @@ This file should reside in the same directory as the PKGBUILD, and will be
copied into the package by makepkg. It does not need to be included in the copied into the package by makepkg. It does not need to be included in the
\fIsource\fR array. (eg, install=pkgname.install) \fIsource\fR array. (eg, install=pkgname.install)
." Is this applicable below?
.TP
.B up2date
This directive should contain a command that prints the current upstream stable
version of the project.
.TP .TP
.B source \fI(array)\fR .B source \fI(array)\fR
The \fIsource\fR line is an array of source files required to build the The \fIsource\fR line is an array of source files required to build the
package. Source files must reside in the same directory as the PKGBUILD package. Source files must reside in the same directory as the PKGBUILD
file, unless they have a fully-qualified URL. file, unless they have a fully-qualified URL.
.TP
.B noextract \fI(array)\fR
The \fInoextract\fR line is an array of filenames corresponding to those from
the \fIsource\fR array. If a file is listed in the \fInoextract\fR array, it is
not extracted with the rest of the source files. This is useful for packages
which use compressed data which id downloaded via the \fIsource\fR array.
.TP .TP
.B md5sums \fI(array)\fR .B md5sums \fI(array)\fR
If this field is present, it should contain an MD5 hash for every source file If this field is present, it should contain an MD5 hash for every source file
@ -164,15 +125,9 @@ this to verify source file integrity during subsequent builds. To easily
generate md5sums, first build using the PKGBUILD then run generate md5sums, first build using the PKGBUILD then run
\fBmakepkg -g >>PKGBUILD\fR. Then you can edit the PKGBUILD and move the \fBmakepkg -g >>PKGBUILD\fR. Then you can edit the PKGBUILD and move the
\fImd5sums\fR line from the bottom to an appropriate location. \fImd5sums\fR line from the bottom to an appropriate location.
\fBNOTE:\fR makepkg supports multiple integrity algorithms and their
." Is this applicable below? corresponding arrays (i.e. sha1sums for the SHA1 algorithm), however official
.TP packages use only md5sums for the time being.
.B signatures \fI(array)\fR
If this field is present, it should contain an array of gpg signatures required
to validate the source files. Where there is no signature available just leave
it empty, like:
signatures=(${source[0]}.asc '')
.TP .TP
.B groups \fI(array)\fR .B groups \fI(array)\fR
@ -181,7 +136,7 @@ you to install multiple packages by requesting a single target. For example,
one could install all KDE packages by installing the 'kde' group. one could install all KDE packages by installing the 'kde' group.
.TP .TP
.B archs \fI(array)\fR .B arch \fI(array)\fR
This array defines on which architectures the given package is available. This array defines on which architectures the given package is available.
.TP .TP
@ -231,17 +186,48 @@ upgrade, due to the differing package names. \fIreplaces\fR handles this.
This array allows you to override some of makepkg's default behaviour This array allows you to override some of makepkg's default behaviour
when building packages. To set an option, just include the option name when building packages. To set an option, just include the option name
in the \fBoptions\fR array. in the \fBoptions\fR array.
.RS See \fBmakepkg (8)\fR for details on the options array.
.SS Install/Upgrade/Remove Scripting
Pacman has the ability to store and execute a package-specific script when it
installs, removes, or upgrades a package. This allows a package to "configure
itself" after installation and do the opposite right before it is removed.
The exact time the script is run varies with each operation:
.TP .TP
.B nostrip .B pre_install
don't strip binaries/libraries. script is run right before files are extracted.
.TP .TP
.B keepdocs .B post_install
keep /usr/share/doc and /usr/share/info directories. script is run right after files are extracted.
.TP .TP
.B force .B pre_upgrade
force the package to be upgraded by --sysupgrade, even if it's an older version. script is run right before files are extracted.
.RE
.TP
.B post_upgrade
script is run after files are extracted.
.TP
.B pre_remove
script is run right before files are removed.
.TP
.B post_remove
script is run right after files are removed.
.P
To use this feature, just create a file (eg, pkgname.install) and put it in
the same directory as the PKGBUILD script. Then use the \fIinstall\fR
directive:
install=pkgname.install
The install script does not need to be specified in the \fIsource\fR array.
A template install file is available in your ABS tree (/var/abs/install.proto).
.SH EXAMPLE .SH EXAMPLE
The following is an example PKGBUILD for the 'modutils' package. For more The following is an example PKGBUILD for the 'modutils' package. For more
@ -249,6 +235,7 @@ examples, look through the ABS tree.
.nf .nf
# Maintainer: John Doe <johndoe@archlinux.org> # Maintainer: John Doe <johndoe@archlinux.org>
# Contributor: Bill Smith <billsmith@archlinux.org>
pkgname=modutils pkgname=modutils
pkgver=2.4.25 pkgver=2.4.25
pkgrel=1 pkgrel=1
@ -259,8 +246,11 @@ depends=('glibc' 'zlib')
backup=(etc/modules.conf) backup=(etc/modules.conf)
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/v2.4/$pkgname-$pkgver.tar.bz2 \\ source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/v2.4/$pkgname-$pkgver.tar.bz2 \\
modules.conf) modules.conf)
arch=('i686')
license=('GPL' 'custom') #dual licensed
md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d' \\ md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d' \\
'35175bee593a7cc7d6205584a94d8625') '35175bee593a7cc7d6205584a94d8625')
options=('nolibtool')
build() { build() {
cd $startdir/src/$pkgname-$pkgver cd $startdir/src/$pkgname-$pkgver
@ -275,7 +265,9 @@ build() {
.SH SEE ALSO .SH SEE ALSO
.BR makepkg (8), .BR makepkg (8),
.BR makepkg.conf (5),
.BR pacman (8) .BR pacman (8)
.BR pacman.conf (5)
See the Arch Linux website at <http://www.archlinux.org> for more current See the Arch Linux website at <http://www.archlinux.org> for more current
information on the distribution, and information on the distribution, and
@ -283,4 +275,7 @@ information on the distribution, and
recommendations on packaging standards. recommendations on packaging standards.
.SH AUTHORS .SH AUTHORS
Judd Vinet <jvinet@zeroflux.org> Judd Vinet <jvinet@zeroflux.org>
and the Frugalware developers <frugalware-devel@frugalware.org> Aurelien Foret <aurelien@archlinux.org>
Aaron Griffin <aaron@archlinux.org>
Dan McGee <dan@archlinux.org>
See the 'AUTHORS' file for additional contributors.