summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/PKGBUILD-example.txt32
-rw-r--r--doc/PKGBUILD.5.txt32
3 files changed, 38 insertions, 29 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a65f1cf7..308f338b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -14,6 +14,7 @@ EXTRA_DIST = \
pacman.8.txt \
makepkg.8.txt \
PKGBUILD.5.txt \
+ PKGBUILD-example.txt \
makepkg.conf.5.txt \
pacman.conf.5.txt \
libalpm.3.txt \
@@ -39,4 +40,6 @@ endif
$(man_MANS): footer.txt
a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
+PKGBUILD.5: PKGBUILD-example.txt
+
# vim:set ts=2 sw=2 noet:
diff --git a/doc/PKGBUILD-example.txt b/doc/PKGBUILD-example.txt
new file mode 100644
index 00000000..50b652bd
--- /dev/null
+++ b/doc/PKGBUILD-example.txt
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD,v 1.16 2006/06/20 07:03:04 tpowa Exp $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=module-init-tools
+pkgver=3.2.2
+pkgrel=3
+pkgdesc="Utilities for inserting and removing modules from the Linux kernel"
+arch=(i686 x86_64)
+url="http://www.kernel.org"
+license=('GPL')
+depends=('glibc')
+conflicts=('modutils')
+replaces=('modutils')
+backup=('etc/modprobe.conf' 'etc/modules.conf' 'etc/modprobe.devfs')
+source=(http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-$pkgver.tar.bz2 \
+ makefile.patch modprobe.conf)
+md5sums=('a1ad0a09d3231673f70d631f3f5040e9' '47e14fda7a46668290d11d0444d81826'\
+ '6db59d41e04941a790f80c1a4432faef')
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ patch -Np1 -i ../makefile.patch || return 1
+ sed -i 's|/usr/bin/install|/bin/install|g' install-with-care
+
+ ./configure --prefix=/usr --exec-prefix=/
+ make || return 1
+
+ INSTALL=/bin/install make DESTDIR="$pkgdir" install
+ install -D -m644 ../modprobe.conf "$pkgdir"/etc/modprobe.conf
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 3fa2f66b..fbb7886c 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -54,7 +54,7 @@ Options and Directives
found in /usr/share/licenses/common, then you should include the license
in the package itself and set license=("custom") or
license=("custom:LicenseName"). The license should be placed in
- $startdir/pkg/usr/share/licenses/$pkgname when building the package. If
+ $pkgdir/usr/share/licenses/$pkgname when building the package. If
multiple licenses are applicable for a package, list all of them:
licenses=('GPL' 'FDL').
@@ -220,37 +220,11 @@ install file is available in the ABS tree (/var/abs/install.proto).
Example
-------
-The following is an example PKGBUILD for the 'modutils' package. For more
+The following is an example PKGBUILD for the 'module-init-tools' package. For more
examples, look through the ABS tree.
-----
-# Maintainer: John Doe <johndoe@archlinux.org>
-# Contributor: Bill Smith <billsmith@archlinux.org>
-pkgname=modutils
-pkgver=2.4.25
-pkgrel=1
-pkgdesc="Utilities for inserting modules in the linux kernel"
-url="http://www.kernel.org"
-makedepends=('bash' 'mawk')
-depends=('glibc' 'zlib')
-backup=(etc/modules.conf)
-source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/v2.4/$pkgname-$pkgver.tar.bz2
- modules.conf)
-arch=('i686')
-license=('GPL' 'custom') # dual licensed
-md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d'
- '35175bee593a7cc7d6205584a94d8625')
-options=(!libtool)
-
-build() {
- cd $startdir/src/$pkgname-$pkgver
- ./configure --prefix=/usr --enable-insmod-static
- make || return 1
- make prefix=$startdir/pkg/usr install
- mv $startdir/pkg/usr/sbin $startdir/pkg
- mkdir -p $startdir/pkg/etc
- cp ../modules.conf $startdir/pkg/etc
-}
+include::PKGBUILD-example.txt[]
-----