updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / rlocate / PKGBUILD
blobd8d2894b6b07745d3dbc6f78f285305c82a8db44
1 # Contributor: Roman Kyrylych <roman@archlinux.org>
2 # Contributor: Tom K <tom@archlinux.org>
4 pkgname=rlocate
5 pkgver=0.5.6
6 pkgrel=4
7 _kernver=2.6.25-ARCH
8 pkgdesc="The rlocate kernel module"
9 arch=('i686' 'x86_64')
10 url="http://rlocate.sourceforge.net/"
11 license=('GPL')
12 replaces=('rlocate-mod')
13 conflicts=('mlocate')
14 depends=('rlocate-utils' 'kernel26')
15 install=rlocate.install
16 source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
17         rlocate-static-lsm.patch)
18 md5sums=('b834e2b1249fba9138bea29a030de46c'
19          '82677b75ed40bea9a53b874d683a52d1')
21 build() {
22   cd $startdir/src/rlocate-$pkgver
23   sed 's|test $CONFIG_SECURITY_CAPABILITIES -eq 1|test $CONFIG_SECURITY_CAPABILITIES -eq 0|' \
24     -i configure
25   patch -Np0 -i ../rlocate-static-lsm.patch
26   ./configure --with-kernel=/lib/modules/$_kernver/build \
27     --with-moduledir=/lib/modules/${_kernver}/misc --with-rlocate-group=locate
28   cd src/rlocate-module
29   make || return 1
30   install -Dm755 rlocate.ko $startdir/pkg/lib/modules/$_kernver/misc/rlocate.ko
32   # tweak the install script for the right kernel version
33   sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
34     $startdir/$pkgname.install || return 1