void-packages/srcpkgs/fcron/template
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc 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

76 lines
1.8 KiB
Bash

# Template file for 'fcron'
pkgname=fcron
version=3.3.0
revision=5
build_style=gnu-configure
configure_args="
--sysconfdir=/etc/fcron
--with-answer-all=no
--with-boot-install=no
--datarootdir=/usr/share
--datadir=/usr/share
--docdir=/usr/share/doc
--localstatedir=/var
--with-piddir=/run
--with-pam=yes
--with-sendmail=/usr/bin/sendmail
--with-editor=/usr/bin/vi
--with-shell=/bin/sh
--disable-checks"
make_dirs="
/etc/cron.daily 0755 root root
/etc/cron.hourly 0755 root root
/etc/cron.monthly 0755 root root
/etc/cron.weekly 0755 root root"
hostmakedepends="autoconf perl"
makedepends="pam-devel readline-devel"
depends="run-parts"
short_desc="Feature-rich cron implementation"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-or-later"
homepage="http://fcron.free.fr"
distfiles="$homepage/archives/$pkgname-$version.src.tar.gz"
checksum=9aead33a0926e2eec123698c502114c6d67b483fe1ec232969fae6809b0bab60
alternatives="
crond:crond:/etc/sv/fcron
crond:crontab:/usr/bin/fcrontab
"
system_accounts="fcron"
fcron_homedir="/var/spool/fcron"
fcron_shell="/bin/sh"
conf_files="
/etc/fcron/fcron.conf
/etc/fcron/fcron.allow
/etc/fcron/fcron.deny
/etc/fcron/pam.conf
/var/spool/fcron/systab.orig"
## me: fcron installer is not the king. I'm.
## fcron: Wine is coming.
CFLAGS="-DHAVE_LIBPAM=1"
LDFLAGS="-Wl,--no-as-needed -lpam"
pre_configure() {
sed -i 's|$(CFLAGS)|$(CFLAGS) $(LDFLAGS)|g' Makefile.in # pass LDFLAGS for PIE
autoupdate
autoconf -f -Wall
}
pre_install() {
sed -i 's/chgrp/true/g' Makefile doc/Makefile
sed -i 's/chown/true/g' Makefile doc/Makefile
}
post_install() {
chmod +rx $DESTDIR/usr/bin/*
vinstall files/fcron.pam 644 etc/pam.d fcron
vinstall files/fcrontab.pam 644 etc/pam.d fcrontab
vinstall $FILESDIR/systab.orig 640 var/spool/fcron
mv $DESTDIR/usr/share/doc/${pkgname}{-${version},}
vsv fcron
}