~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-10-11 16:10:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041011161027-icyjbji8ujym633o
Tags: 1:4.2.0a-10ubuntu2
Use ntp.ubuntulinux.org instead of pool.ntp.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
3
# Comment this to turn off verbose mode.
4
 
export DH_VERBOSE=1
5
 
# This is the debhelper compatability version to use.
6
 
export DH_COMPAT=3
 
4
# export DH_VERBOSE=1
 
5
 
 
6
config: config-stamp
 
7
config-stamp:
 
8
        dh_testdir
 
9
 
 
10
        # Create autoconf stuff, if not present
 
11
        if test ! -f configure; then $(MAKE) -f debian/rules clean; fi
 
12
        chmod +x ./configure
 
13
 
 
14
        # refclock version
 
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
 
21
 
 
22
        # build simple version
 
23
        mkdir -p build-simple
 
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 \
 
28
                --disable-errorcache
 
29
        touch build-simple/stamp-h.in
 
30
 
 
31
        touch config-stamp
7
32
 
8
33
build: build-stamp
9
 
build-stamp:
 
34
build-stamp: config-stamp
10
35
        dh_testdir
11
36
 
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 {} \;
15
 
 
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 \
19
 
                --disable-debugging 
20
 
        touch stamp-h.in
21
 
        make 
22
 
        mv ntpd/ntpd ntpd/ntpd-refclock
23
 
 
24
 
        # clean up enough from the first build to make the second one work
25
 
        make clean
26
 
        rm -f config.status
27
 
 
28
 
        # build simple version, which will become the default installed
29
 
        ./configure --prefix=/usr \
30
 
                --disable-all-clocks --disable-parse-clocks --disable-debugging
31
 
        touch stamp-h.in
32
 
        make 
 
37
        make -C build-refclock/ntpd
 
38
        make -C build-simple
33
39
 
34
40
        touch build-stamp
35
41
 
36
42
clean:
37
43
        dh_testdir
38
44
        dh_testroot
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
 
47
        rm -f config.cache
 
48
 
 
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
 
53
 
 
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
 
58
 
 
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
 
62
 
42
63
        dh_clean
43
64
 
44
 
install: install-stamp
45
 
install-stamp: build-stamp
 
65
install: build-stamp
46
66
        dh_testdir
47
67
        dh_testroot
48
68
        dh_clean -k
49
69
        dh_installdirs
50
70
 
51
 
        $(MAKE) install \
 
71
        $(MAKE) -C build-simple install \
52
72
                bindir=`pwd`/debian/ntp/usr/sbin \
53
73
                prefix=`pwd`/debian/ntp/usr
54
74
 
57
77
                mv debian/ntp/usr/sbin/$$file debian/ntp/usr/bin/$$file; \
58
78
        done
59
79
 
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
63
 
 
64
 
        install -o root -g root -m 0755 scripts/ntpsweep \
 
82
        install build-refclock/ntpd/ntpd debian/ntp-refclock/usr/sbin/ntpd
 
83
 
 
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; \
 
87
        done
 
88
 
 
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...
 
96
 
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
 
127
 
85
128
        dh_movefiles --sourcedir=debian/ntp
86
 
        touch install-stamp
87
129
 
88
130
# Build architecture-independent files here.
89
131
binary-indep: build install
92
134
        dh_testroot -i
93
135
        dh_installdocs -i html
94
136
        rm -f debian/ntp-doc/usr/share/doc/ntp-doc/html/hints/solaris*
95
 
        rm -f debian/ntp-doc/usr/share/doc/ntp-doc/html/htmlprimer.htm
 
137
        find debian/ntp-doc/usr/share/doc/ntp-doc/html/ -name SCCS -print0 \
 
138
                | xargs -0r rm -rf
 
139
        rm -f debian/ntp-doc/usr/share/doc/ntp-doc/html/htmlprimer.html
96
140
        dh_installexamples -i
97
141
        dh_installmenu -i
98
142
#       dh_installemacsen -i
102
146
#       dh_installmanpages -i ansi2knr.1
103
147
#       dh_undocumented
104
148
        dh_installchangelogs -i
105
 
        gzip -9 debian/ntp-doc/usr/share/doc/ntp-doc/changelog.Debian
 
149
        gzip -9f debian/ntp-doc/usr/share/doc/ntp-doc/changelog.Debian
106
150
        dh_fixperms -i
107
 
        dh_suidregister -i
108
151
        dh_installdeb -i
109
152
        dh_gencontrol -i
110
153
        dh_md5sums -i
120
163
        dh_installmenu -a
121
164
#       dh_installemacsen -a
122
165
        dh_installdebconf -a
123
 
        dh_installinit -pntp-simple --update-rcd-params="defaults 23" \
124
 
                --init-script=ntp
125
 
        dh_installinit -pntp-refclock --update-rcd-params="defaults 23" \
126
 
                --init-script=ntp
 
166
        dh_installinit -pntp-server --update-rcd-params="defaults 23" 
127
167
        dh_installinit -pntpdate --update-rcd-params="start 51 S ." \
128
168
                --init-script=ntpdate
129
169
        dh_installcron -a
130
170
#       dh_installmanpages -a ansi2knr.1
131
171
#       dh_undocumented
132
 
        dh_installchangelogs -a ChangeLog
 
172
        dh_installchangelogs -a
133
173
        dh_strip -a
134
174
        dh_compress -a
135
175
        dh_fixperms -a
136
 
        dh_suidregister -a
137
176
        dh_installdeb -a
138
177
        dh_shlibdeps -a
139
178
        dh_gencontrol -a
145
184
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
146
185
 
147
186
binary: binary-indep binary-arch
148
 
.PHONY: build clean binary-indep binary-arch binary
 
187
.PHONY: build clean binary-indep binary-arch binary install