void-packages/srcpkgs/autofs/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

43 lines
1.3 KiB
Bash

# Template file for 'autofs'
pkgname=autofs
version=5.1.7
revision=1
build_style=gnu-configure
make_build_args="DONTSTRIP=1"
configure_args="--with-libtirpc --with-mapdir=/etc/autofs --sbindir=/usr/bin"
conf_files="/etc/autofs/*"
hostmakedepends="pkg-config flex kmod rpcsvc-proto"
makedepends="libtirpc-devel libxml2-devel"
short_desc="Kernel-based automounter for Linux"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-2.0-or-later"
homepage="https://www.kernel.org/pub/linux/daemons/autofs"
distfiles="${KERNEL_SITE}/daemons/autofs/v5/autofs-${version}.tar.xz"
checksum=a36b268611b79b07051749870ba540b139938efc84bc0293244c483e94f9ced7
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/gssglue -I${XBPS_CROSS_BASE}/usr/include/tirpc"
if [ -z "$CROSS_BUILD" ] && [ "$XBPS_TARGET_LIBC" != "musl" ]; then
makedepends+=" sssd-devel"
fi
pre_configure() {
sed -i 's,nfs/nfs.h,linux/nfs.h,g' */*.[ch]
sed -i 's,__S_IEXEC,S_IXUSR,g' */*.[ch]
# chmod +x configure
}
pre_build() {
unset STRIP
# Fix path for map files
vsed -e "s@/etc/@/etc/autofs/@g" -i samples/auto.master
}
post_install() {
vsv $pkgname
make DESTDIR=${DESTDIR} -C samples install
# Remove unused stuff
rm ${DESTDIR}/usr/share/man/man5/autofs.5
rm -r ${DESTDIR}/etc/default || :
rm ${DESTDIR}/autofs || :
}