Package-Name: ntp
Gentoo-Package: net-misc/ntp
Rebuild-For: openssl
Homepage: http://www.ntp.org/
Source: ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-(\d+.\d+.([0-6]?\d[a-z]?\d?)).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	test -d ntp-"$(VERSION)" || mv ntp* ntp-"$(VERSION)"
Compile:
	cp -af COPYRIGHT ChangeLog* NEWS NOTES* TODO html "$(PREFIX)/"
	$(MAKE) -f ../Makefile configure
	(echo '#define CONFIG_FILE "/etc/ntp/ntp.conf"' ; cat include/ntp_config.h) > ntp_config.h.new
	mv -f ntp_config.h.new include/ntp_config.h
	(echo '#define CONFIG_FILE "/etc/ntp/ntp.conf"' ; cat ntpdate/ntptime_config.c) > ntptime_config.c.new
	mv -f ntptime_config.c.new ntpdate/ntptime_config.c
	(echo '#define KEYFILE "/etc/ntp/ntp.keys"' ; cat ntpdate/ntpdate.c) > ntpdate.c.new
	mv -f ntpdate.c.new ntpdate/ntpdate.c
	(echo '#define KEYFILE "/etc/ntp/ntp.keys"' ; cat ntpdate/ntptimeset.c) > ntptimeset.c.new
	mv -f ntptimeset.c.new ntpdate/ntptimeset.c
	$(MAKE)
	$(MAKE) install
	umask 022 ; mkdir -p "$(PREFIX)"/{etc,sbin}
	mv -f conf/* "$(PREFIX)"/etc/
	if test -f "$(PREFIX)"/bin/ntpd ; then \
		mv -f "$(PREFIX)"/bin/ntpd "$(PREFIX)"/sbin/ ; \
	fi
Install:
	$(MAKE) instbin BIN="ntp-keygen ntp-wait ntpdate ntpdc ntpq ntptime ntptrace sntp tickadj"
	$(MAKE) instsbin SBIN=ntpd
	$(MAKE) instetc DEST=ntp ETC="ntp.conf ntp.drift" LINK="[A-mo-z]*"

-/etc/ntp/
/etc/ntp/
/pkg/ntp/
/usr/bin/ntp-keygen
/usr/bin/ntp-wait
/usr/bin/ntpdate
/usr/bin/ntpdc
/usr/bin/ntpq
/usr/bin/ntptime
/usr/bin/ntptrace
/usr/bin/sntp
/usr/bin/tickadj
/usr/sbin/ntpd
