OCaml 4.14.0 rebuild
[arch-packages.git] / mlocate / trunk / PKGBUILD
blob7b2055fc94b500a41ce38090c410e40ecc14abae
1 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: lydgate
5 pkgname=mlocate
6 pkgver=0.26.git.20170220
7 _commit=c98bf6595703456558a6f9c163c746cdaa9e591f
8 pkgrel=7
9 pkgdesc='Merging locate/updatedb implementation'
10 url='https://pagure.io/mlocate'
11 arch=('x86_64')
12 license=('GPL')
13 backup=('etc/updatedb.conf')
14 depends=('glibc')
15 makedepends=('git')
16 install=mlocate.install
17 source=("git+https://pagure.io/mlocate.git#commit=$_commit"
18         'git+https://git.savannah.gnu.org/git/gnulib.git#commit=5861339993f3014cfad1b94fc7fe366fc2573598'
19         'sysusers.d'
20         'updatedb.conf'
21         'updatedb.timer'
22         'updatedb.service')
23 sha256sums=('SKIP'
24             'SKIP'
25             '1713a8fc8b81f4a390bf8597c4c0e917474379002dcc984aad2f44218d10c82a'
26             'd00796741e2194032d0185b40de70ff5c8a11fda416a70434eb0aa2020981f91'
27             '94520117a4a2e16b5f2311c406904369d72690b8998c39ee4cf758009fdddbcb'
28             'af0db83e34ffd0325101042760d4a5e3bccacbc3a0ef42c997e42507bf4ba6a3')
30 prepare() {
31         cd "${srcdir}/${pkgname}"
32         sed -i '/^groupname /s/mlocate/locate/' Makefile.am
33         ../gnulib/gnulib-tool --import # See file: ./HACKING
34         autoreconf --install
37 build() {
38         cd "${srcdir}/${pkgname}"
39         ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
40         make
43 check() {
44         cd "${srcdir}/${pkgname}"
45         make check
48 package() {
49         cd "${srcdir}/${pkgname}"
51         make DESTDIR="${pkgdir}" install
53         # fix group and permissions of /var/lib/mlocate; the Makefile does not
54         # do this because it uses a group name instead of a group id and fails
55         # https://lists.archlinux.org/pipermail/arch-general/2018-June/045165.html
56         chgrp 21 "${pkgdir}/var/lib/mlocate"
57         chmod 750 "${pkgdir}/var/lib/mlocate"
59         chgrp 21 "${pkgdir}/usr/bin/locate"
60         chmod 2755 "${pkgdir}/usr/bin/locate"
61         ln -s locate "${pkgdir}/usr/bin/slocate"
63         install -dm755 "${pkgdir}/var/lib"
64         install -dm750 -g21 "${pkgdir}/var/lib/locate"
66         install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf"
67         install -Dm644 ../sysusers.d "${pkgdir}/usr/lib/sysusers.d/locate.conf"
68         install -Dm644 ../updatedb.timer "${pkgdir}/usr/lib/systemd/system/updatedb.timer"
69         install -Dm644 ../updatedb.service "${pkgdir}/usr/lib/systemd/system/updatedb.service"
71         install -d "${pkgdir}/usr/lib/systemd/system/timers.target.wants"
72         ln -s ../updatedb.timer "${pkgdir}/usr/lib/systemd/system/timers.target.wants/updatedb.timer"