APKBUILD 1.75 KB
Newer Older
Alex Laskin's avatar
Alex Laskin committed
1 2 3
# Contributor: Alex Laskin <alex@lask.in>
# Maintainer: Alex Laskin <alex@lask.in>
pkgname=autofs
Leo's avatar
Leo committed
4 5
pkgver=5.1.5
pkgrel=0
Alex Laskin's avatar
Alex Laskin committed
6 7 8
pkgdesc="A kernel-based automounter for Linux"
url="https://www.kernel.org/pub/linux/daemons/autofs/"
arch="all"
Henrik Riomar's avatar
Henrik Riomar committed
9 10
license="GPL-2.0-or-later"
makedepends="linux-headers automake flex bison rpcgen libtirpc-dev libnfs-dev coreutils"
Alex Laskin's avatar
Alex Laskin committed
11
subpackages="$pkgname-doc $pkgname-openrc"
Henrik Riomar's avatar
Henrik Riomar committed
12
options="!check" # no test suite provided
Alex Laskin's avatar
Alex Laskin committed
13
source="
Leo's avatar
Leo committed
14 15 16 17 18
	https://www.kernel.org/pub/linux/daemons/$pkgname/v5/$pkgname-$pkgver.tar.xz
	autofs.initd
	autofs.confd
	10-glibc.patch
	"
Alex Laskin's avatar
Alex Laskin committed
19

Leo's avatar
Leo committed
20 21 22 23
prepare() {
	default_prepare
	sed -i 's,nfs/nfs.h,linux/nfs.h,g' */*.[ch]
	sed -i 's,__S_IEXEC,S_IXUSR,g' */*.[ch]
Alex Laskin's avatar
Alex Laskin committed
24 25
}

Leo's avatar
Leo committed
26 27 28 29 30 31 32 33 34 35
build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/autofs \
		--with-mapdir=/etc/autofs \
		--with-confdir=/etc/conf.d \
		--without-hesiod \
		--with-libtirpc \
		--enable-ignore-busy
	make
Alex Laskin's avatar
Alex Laskin committed
36 37 38
}

package() {
Leo's avatar
Leo committed
39 40 41 42
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
Alex Laskin's avatar
Alex Laskin committed
43

Leo's avatar
Leo committed
44 45
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
Alex Laskin's avatar
Alex Laskin committed
46

Leo's avatar
Leo committed
47 48 49
	rm -f "$pkgdir"/usr/share/man/man5/autofs.5
	rm -rf "$pkgdir"/etc/default
	rm -f "$pkgdir"/autofs
Alex Laskin's avatar
Alex Laskin committed
50 51
}

Leo's avatar
Leo committed
52 53
sha512sums="c8138929a9e2cfa7e0096c1d490b9d7275d1d43a50f5f87ad457bdd9a49c7dd13a4aa5d86ab1e028d66dae630e1a1342661844e5775625fe585867f0f4778898  autofs-5.1.5.tar.xz
e7ffe40cf5f302f7de7cc59752699adad4be89fa78fa1a79c32ce4059ec2f563c0f107ca2cec850cabfb1cdebca5ff1f369167479423ab6cfe509225a799a00e  autofs.initd
Alex Laskin's avatar
Alex Laskin committed
54 55
74884b94d8c5dc72579c9c0c9f13c8918ee0babe6fc1e6352bb79cfaf6f5ce3daa87a9b2ea2f34a4600c93a971b329aa0892785fe2efd42829fb7953a6130dd7  autofs.confd
c4edd75443543aa06b7741c2ee4907718d21e791ea70abc7b2b7b8413a7a82a663a3b7ef7bad1661a5d31aab86cc934cba2b4bd0803e502f7db4e73d374adf64  10-glibc.patch"