```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 ```
39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
# Template file for 'openntpd'
|
|
pkgname=openntpd
|
|
version=6.2p3
|
|
revision=9
|
|
build_style=gnu-configure
|
|
configure_args="--with-privsep-user=${pkgname} --with-cacert=/etc/ssl/certs.pem"
|
|
hostmakedepends="automake libtool"
|
|
makedepends="libtls-devel"
|
|
depends="ca-certificates"
|
|
short_desc="FREE, easy to use implementation of the Network Time Protocol"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="ISC"
|
|
homepage="http://openntpd.org/"
|
|
distfiles="http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/${pkgname}-${version}.tar.gz"
|
|
checksum=7b02691524197e01ba6b1b4b7595b33956e657ba6d5c4cf2fc20ea3f4914c13a
|
|
|
|
conf_files="/etc/ntpd.conf"
|
|
provides="ntp-daemon-0_1"
|
|
system_accounts="$pkgname"
|
|
alternatives="
|
|
ntpd:ntpd:/usr/bin/openntpd
|
|
ntpd:ntpd.8:/usr/share/man/man8/openntpd.8
|
|
ntpd:ntpd:/etc/sv/openntpd"
|
|
|
|
CFLAGS="-fcommon"
|
|
|
|
pre_configure() {
|
|
autoreconf -fi
|
|
}
|
|
post_install() {
|
|
# Rename files for alternatives.
|
|
mv ${DESTDIR}/usr/bin/{ntpd,$pkgname}
|
|
mv ${DESTDIR}/usr/share/man/man8/{ntpd,openntpd}.8
|
|
# Use a symlink instead.
|
|
rm ${DESTDIR}/usr/bin/ntpctl
|
|
ln -s openntpd ${DESTDIR}/usr/bin/ntpctl
|
|
vsv $pkgname
|
|
vlicense COPYING
|
|
}
|