3
3
# Comment this to turn off verbose mode.
5
# This is the debhelper compatability version to use.
10
# Create autoconf stuff, if not present
11
if test ! -f configure; then $(MAKE) -f debian/rules clean; fi
15
mkdir -p build-refclock
16
cd build-refclock && ../configure --prefix=/usr \
17
--enable-all-clocks --enable-parse-clocks --enable-SHM \
18
--disable-debugging --sysconfdir=/var/lib/ntp \
19
--cache-file=../config.cache --disable-errorcache
20
touch build-refclock/stamp-h.in
22
# build simple version
24
cd build-simple && ../configure --prefix=/usr \
25
--disable-all-clocks --disable-parse-clocks \
26
--disable-debugging --enable-LOCAL-CLOCK \
27
--sysconfdir=/var/lib/ntp --cache-file=../config.cache \
29
touch build-simple/stamp-h.in
34
build-stamp: config-stamp
12
# keep the build process from re-running autoconf and friends
13
touch aclocal.m4 configure config.h.in
14
find . -name Makefile.in -exec touch {} \;
16
# build refclock version first, and move the daemon out of the way
17
./configure --prefix=/usr \
18
--enable-all-clocks --enable-parse-clocks --enable-SHM \
22
mv ntpd/ntpd ntpd/ntpd-refclock
24
# clean up enough from the first build to make the second one work
28
# build simple version, which will become the default installed
29
./configure --prefix=/usr \
30
--disable-all-clocks --disable-parse-clocks --disable-debugging
37
make -C build-refclock/ntpd
39
rm -f build-stamp install-stamp
40
make distclean || exit 0
41
rm -f ntpdate/version.c ntpq/version.c ntpd/ntpd-refclock
45
rm -f config-stamp build-stamp
46
rm -rf build-simple build-refclock
49
-test -r /usr/share/misc/config.sub && \
50
cp -f /usr/share/misc/config.sub config.sub
51
-test -r /usr/share/misc/config.guess && \
52
cp -f /usr/share/misc/config.guess config.guess
54
-if test -f aclocal.m4 ; then touch aclocal.m4; else aclocal-1.7; fi
55
-if test -f config.h.in ; then touch config.h.in; else autoheader; fi
56
-if test -f Makefile.in ; then find . -name Makefile.in -exec touch {} \; ;\
57
else automake-1.7 --copy --add-missing; fi
59
-if test -f configure ; then touch configure; else autoconf; fi
60
-if test -f version ; then touch version; else \
61
dpkg-parsechangelog | sed -ne 's/^Version:[ ]*//p' > version; fi
44
install: install-stamp
45
install-stamp: build-stamp
71
$(MAKE) -C build-simple install \
52
72
bindir=`pwd`/debian/ntp/usr/sbin \
53
73
prefix=`pwd`/debian/ntp/usr
57
77
mv debian/ntp/usr/sbin/$$file debian/ntp/usr/bin/$$file; \
60
# move the daemons to their packages
80
# move the daemon to their packages
61
81
mv debian/ntp/usr/sbin/ntpd debian/ntp-simple/usr/sbin/ntpd
62
mv ntpd/ntpd-refclock debian/ntp-refclock/usr/sbin/ntpd
64
install -o root -g root -m 0755 scripts/ntpsweep \
82
install build-refclock/ntpd/ntpd debian/ntp-refclock/usr/sbin/ntpd
84
# move support programs
85
for file in ntp-wait ntptime tickadj; do \
86
mv debian/ntp/usr/sbin/$$file debian/ntp-server/usr/sbin/$$file; \
89
install -o root -g root -m 0755 build-simple/scripts/ntpsweep \
65
90
debian/ntp/usr/bin/ntpsweep
91
install -o root -g root -m 0755 build-simple/util/ntp-keygen \
92
debian/ntp/usr/sbin/ntp-keygen
66
93
install -o root -g root -m 0644 debian/ntpsweep.1 \
67
94
debian/ntp/usr/share/man/man1/ntpsweep.1
68
95
# hand-craft the manpages since they're all worthless creations...
69
97
install -o root -g root -m 0644 debian/ntpdate.1 \
70
98
debian/ntpdate/usr/share/man/man1/ntpdate.1
71
install -o root -g root -m 0644 debian/useless.1 \
72
debian/ntpdate/usr/share/man/man1/ntptimeset.1
73
99
install -o root -g root -m 0644 debian/ntpd.1 \
74
100
debian/ntp-simple/usr/share/man/man1/ntpd.1
75
101
install -o root -g root -m 0644 debian/ntpd.1 \
76
102
debian/ntp-refclock/usr/share/man/man1/ntpd.1
77
103
install -o root -g root -m 0644 debian/useless.1 \
78
104
debian/ntp/usr/share/man/man1/ntpdc.1
79
gzip -9 debian/ntp/usr/share/man/man1/ntpdc.1
80
(cd debian/ntp/usr/share/man/man1 ; \
81
ln ntpdc.1.gz ntpq.1.gz ;\
82
ln ntpdc.1.gz ntptime.1.gz ;\
83
ln ntpdc.1.gz ntptrace.1.gz ;\
84
ln ntpdc.1.gz tickadj.1.gz )
105
install -o root -g root -m 0644 debian/useless.1 \
106
debian/ntp/usr/share/man/man1/ntp-keygen.1
107
install -o root -g root -m 0644 debian/useless.1 \
108
debian/ntp-server/usr/share/man/man1/ntp-wait.1
109
install -o root -g root -m 0644 debian/useless.1 \
110
debian/ntp/usr/share/man/man1/ntpq.1
111
install -o root -g root -m 0644 debian/useless.1 \
112
debian/ntp/usr/share/man/man1/ntptrace.1
113
install -o root -g root -m 0644 debian/useless.1 \
114
debian/ntp-server/usr/share/man/man1/tickadj.1
115
install -o root -g root -m 0644 debian/useless.1 \
116
debian/ntp-server/usr/share/man/man1/ntptime.1
117
install -o root -g root -m 0644 debian/ntp.conf \
118
debian/ntp-server/etc
119
install -o root -g root -m 0644 debian/useless.5 \
120
debian/ntp-server/usr/share/man/man5/ntp.conf.5
121
install -o root -g root -m 0644 debian/ntpdate.default \
122
debian/ntpdate/etc/default/ntpdate
123
install -o root -g root -m 0644 debian/ntp-server.ignore \
124
debian/ntp-server/etc/logcheck/ignore.d.server/ntp-server
125
install -o root -g root -m 0644 debian/ntpdate.ignore \
126
debian/ntpdate/etc/logcheck/ignore.d.server/ntpdate
85
128
dh_movefiles --sourcedir=debian/ntp
88
130
# Build architecture-independent files here.
89
131
binary-indep: build install