2010-09-04 05:10:46 +08:00
|
|
|
# $Id: PKGBUILD 75563 2010-04-01 20:42:21Z giovanni $
|
|
|
|
# Maintainer: dorphell <dorphell@archlinux.org>
|
|
|
|
|
|
|
|
pkgname=ntp
|
2011-05-13 06:49:37 +08:00
|
|
|
pkgver=4.2.6.p3
|
|
|
|
_realver=4.2.6p3
|
2010-09-04 05:10:46 +08:00
|
|
|
pkgrel=3
|
|
|
|
pkgdesc="NTP (Network Time Protocol) tries to keep servers in sync"
|
|
|
|
arch=(i686 x86_64)
|
|
|
|
license=('custom')
|
|
|
|
url="http://www.ntp.org/"
|
|
|
|
depends=('openssl' 'readline' 'libcap')
|
|
|
|
makedepends=('perl-html-parser')
|
|
|
|
backup=('etc/ntp.conf' 'etc/conf.d/ntp-client.conf')
|
|
|
|
options=('!emptydirs')
|
2011-05-13 06:49:37 +08:00
|
|
|
source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz
|
2010-09-04 05:10:46 +08:00
|
|
|
ntp-4.2.4-html2man.patch
|
2011-05-13 06:49:37 +08:00
|
|
|
ntp.conf
|
|
|
|
ntp-client.conf
|
|
|
|
ntpd
|
|
|
|
ntpdate)
|
|
|
|
md5sums=('59876a9009b098ff59767ee45a88ebd2'
|
|
|
|
'1b04e888717bb31479a6087632981723'
|
|
|
|
'6e3bac6153ab072d60d6f494093d2ded'
|
|
|
|
'58997d6cf4846d80e35a01b855376a33'
|
|
|
|
'bf20804e75656609e808ca21b53ea4aa'
|
|
|
|
'140855352baeb89da0c6c1c475c18b57')
|
2010-09-04 05:10:46 +08:00
|
|
|
|
|
|
|
build() {
|
2011-05-13 06:49:37 +08:00
|
|
|
cd "$srcdir/$pkgname-$_realver"
|
2010-09-04 05:10:46 +08:00
|
|
|
# fix man page generation
|
2011-05-13 06:49:37 +08:00
|
|
|
patch -Np1 -i ../ntp-4.2.4-html2man.patch
|
2010-09-04 05:10:46 +08:00
|
|
|
# configure
|
|
|
|
export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
|
2011-05-13 06:49:37 +08:00
|
|
|
# 4.2.6p3: aclocal too old, regenerate
|
|
|
|
rm -f aclocal.m4
|
|
|
|
libtoolize --copy --force
|
|
|
|
ac_cv_header_dns_sd_h=0 ./configure --prefix=/usr \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--enable-linux-caps
|
|
|
|
# build
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$srcdir/$pkgname-$_realver"
|
2010-09-04 05:10:46 +08:00
|
|
|
|
2011-05-13 06:49:37 +08:00
|
|
|
# install
|
|
|
|
make DESTDIR="$pkgdir" install
|
2010-09-04 05:10:46 +08:00
|
|
|
|
|
|
|
# install conf files
|
2011-05-13 06:49:37 +08:00
|
|
|
install -d "$pkgdir/usr/share/ntp"
|
|
|
|
install -D -m644 conf/* "${pkgdir}/usr/share/ntp"
|
2010-09-04 05:10:46 +08:00
|
|
|
|
|
|
|
# install launch scripts
|
2011-05-13 06:49:37 +08:00
|
|
|
install -d "$pkgdir/etc/rc.d"
|
|
|
|
install -D -m755 ${srcdir}/{ntpd,ntpdate} "$pkgdir/etc/rc.d"
|
2010-09-04 05:10:46 +08:00
|
|
|
|
|
|
|
# install man pages
|
|
|
|
cd html
|
2011-05-13 06:49:37 +08:00
|
|
|
../scripts/html2man
|
|
|
|
sed -i 's/^[\t\ ]*$//;/./,/^$/!d' man/man*/*.[58]
|
2010-09-04 05:10:46 +08:00
|
|
|
install -d "$pkgdir"/usr/share/man/man{5,8}
|
2011-05-13 06:49:37 +08:00
|
|
|
install -m644 man/man5/* "$pkgdir/usr/share/man/man5/"
|
|
|
|
install -m644 man/man8/* "$pkgdir/usr/share/man/man8/"
|
|
|
|
mv "$pkgdir/usr/share/man/man8/ntpd.8" "$pkgdir/usr/share/man/man8/ntp-ntpd.8"
|
2010-09-04 05:10:46 +08:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# install sample configs
|
2011-05-13 06:49:37 +08:00
|
|
|
install -D -m644 "$srcdir/ntp.conf" "$pkgdir/etc/ntp.conf"
|
2010-09-04 05:10:46 +08:00
|
|
|
install -D -m644 "$srcdir/ntp-client.conf" \
|
2011-05-13 06:49:37 +08:00
|
|
|
"$pkgdir/etc/conf.d/ntp-client.conf"
|
2010-09-04 05:10:46 +08:00
|
|
|
|
|
|
|
# create /var/lib/ntp
|
2011-05-13 06:49:37 +08:00
|
|
|
install -d "$pkgdir/var/lib/ntp"
|
|
|
|
touch "$pkgdir/var/lib/ntp/.placeholder"
|
2010-09-04 05:10:46 +08:00
|
|
|
|
2011-05-13 06:49:37 +08:00
|
|
|
install -Dm644 "$srcdir/$pkgname-$_realver/COPYRIGHT" \
|
|
|
|
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
2010-09-04 05:10:46 +08:00
|
|
|
}
|