```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 ```
51 lines
1.4 KiB
Bash
51 lines
1.4 KiB
Bash
# Template file for 'ntp'
|
|
pkgname=ntp
|
|
version=4.2.8p15
|
|
revision=5
|
|
build_style=gnu-configure
|
|
configure_args="--with-crypto --enable-linuxcap --enable-ipv6 --enable-ntp-signd
|
|
--enable-all-clocks ol_cv_pthread_select_yields=yes"
|
|
hostmakedepends="pkg-config bison perl"
|
|
makedepends="libedit-devel openssl-devel libcap-devel libevent-devel pps-tools-devel"
|
|
short_desc="Network Time Protocol daemon and utilities"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="NTP"
|
|
homepage="http://www.ntp.org/"
|
|
distfiles="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${version}.tar.gz"
|
|
checksum=f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19
|
|
|
|
make_dirs="/var/db/ntpd 0755 ntpd ntpd"
|
|
conf_files="/etc/ntp.conf"
|
|
system_accounts="ntpd"
|
|
ntpd_homedir="/var/db/ntpd"
|
|
provides="ntp-daemon-0_1"
|
|
alternatives="
|
|
ntpd:ntpd:/usr/bin/isc-ntpd
|
|
ntpd:ntpd.8:/usr/share/man/man8/isc-ntpd.8
|
|
ntpd:ntpd:/etc/sv/isc-ntpd"
|
|
|
|
post_extract() {
|
|
sed -i 's/linux/GLIBC/g' ntpd/ntpd.c
|
|
}
|
|
|
|
post_install() {
|
|
# Rename files for alternatives.
|
|
vmkdir usr/share/man/man8
|
|
mv ${DESTDIR}/usr/bin/{ntpd,isc-ntpd}
|
|
mv ${DESTDIR}/usr/share/man/man1/ntpd.1 \
|
|
${DESTDIR}/usr/share/man/man8/isc-ntpd.8
|
|
vconf ${FILESDIR}/ntp.conf
|
|
vsv isc-ntpd
|
|
rm -r ${DESTDIR}/usr/share/doc
|
|
vlicense COPYRIGHT
|
|
}
|
|
|
|
ntp-perl_package() {
|
|
depends="ntp>=$version perl"
|
|
short_desc+=" - perl scripts"
|
|
pkg_install() {
|
|
vmove usr/bin/ntp-wait
|
|
vmove usr/bin/ntptrace
|
|
vmove usr/share/ntp/lib
|
|
}
|
|
}
|