archrelease: copy trunk to extra-x86_64
[arch-packages.git] / man-db / trunk / PKGBUILD
blob0cd7aa8f5b71b50b4443c0fc530fefdac05cb847
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
2 # Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
4 pkgname=man-db
5 pkgver=2.9.4
6 pkgrel=2
7 pkgdesc="A utility for reading man pages"
8 arch=('x86_64')
9 url="https://www.nongnu.org/man-db/"
10 license=('GPL' 'LGPL')
11 depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less' 'libseccomp')
12 makedepends=('po4a')
13 optdepends=('gzip') # covered by virtual "base" package
14 backup=('etc/man_db.conf')
15 conflicts=('man')
16 provides=('man')
17 replaces=('man')
18 install=${pkgname}.install
19 source=(https://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.asc}
20         # fallback should be used within first 24h after a release
21         #https://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.asc} 
22         snapdir.diff
23         convert-mans
25 validpgpkeys=('AC0A4FF12611B6FCCF01C111393587D97D86500B') # Colin Watson <cjwatson@debian.org>
26 sha512sums=('169f091dd0a1d0dbd1583366f8257afb8f57e030d0f7d4213c14ce0b1fc5debf8b9cf2731de503830cb2826b3a22b3cff7da993d44ec18557935bd293529133c'
27             'SKIP'
28             'f24a8152c82c3b99dab2c34654382512f226bb6b0e5e3b1376d577019a4cca0f4e5a9ac92c62ed7ea5cf0ed3ad94509d34f455d845bc5fb026ef908da82cd5fe'
29             '0b159285da20008f0fc0afb21f1eaebd39e8df5b0594880aa0e8a913b656608b8d16bb8d279d9e62d7aae52f62cb9b2fc49e237c6711f4a5170972b38d345535')
31 prepare() {
32   cd ${pkgname}-${pkgver}
33   # fix default Add MANDB_MAP entry mapping /snap/man to /var/cache/man/snap
34   # Arch needs /var/lib/snapd/snap/man to /var/cache/man/snap
35   patch -Np0 -i ../snapdir.diff
39 build() {
40   cd ${pkgname}-${pkgver}
41   ./configure --prefix=/usr \
42     --sbindir=/usr/bin \
43     --sysconfdir=/etc \
44     --libexecdir=/usr/lib \
45     --with-systemdsystemunitdir=/usr/lib/systemd/system \
46     --with-db=gdbm \
47     --disable-setuid \
48     --enable-cache-owner=root \
49     --enable-mandirs=GNU \
50     --with-sections="1 1p n l 8 3 3p 0 0p 2 5 4 9 6 7"
51   make
54 check() {
55   cd ${pkgname}-${pkgver}
56   make check
59 package() {
60   cd ${pkgname}-${pkgver}
61   make DESTDIR=${pkgdir} install
63   # part of groff pkg
64   rm -f ${pkgdir}/usr/bin/zsoelim
66   # script from LFS to convert manpages, see
67   # http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
68   install -D -m755 ${srcdir}/convert-mans  ${pkgdir}/usr/bin/convert-mans
70   install -d -m755 ${pkgdir}/usr/lib/systemd/system/timers.target.wants
71   ln -s ../man-db.timer ${pkgdir}/usr/lib/systemd/system/timers.target.wants/man-db.timer