annotate debian/rules @ 326:f478d73876e7 noffle

[svn] added xinetd dependency option and example
author godisch
date Mon, 24 Feb 2003 06:22:57 +0000
parents 67ce1ddf7313
children a9d3ea0478c1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
1 #!/usr/bin/make -f
326
f478d73876e7 [svn] added xinetd dependency option and example
godisch
parents: 323
diff changeset
2 # $Id: rules 461 2003-02-24 06:22:57Z godisch $
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
3
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
4 #export MAINT_BUILD=1
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
5
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
6 BUILDDIR = debian/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
7 DEBDIR = $(BUILDDIR)/DEBIAN
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
8 DOCDIR = $(BUILDDIR)/usr/share/doc/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
9 SPOOLDIR = $(BUILDDIR)/var/spool/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
10 MANDIR = $(BUILDDIR)/usr/share/man
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
11 testdir = test -f src/noffle.c -a -f debian/rules
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
12 testroot = test x`whoami` = xroot
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
13
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
14 # FOR AUTOCONF 2.13 ONLY
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
15 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
16 CONFFLAGS += $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
17 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
18 CONFFLAGS += --host $(DEB_BUILD_GNU_TYPE) --build $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
19 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
20
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
21 # FOR AUTOCONF 2.52 AND NEWER ONLY
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
22 #ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 # CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 #else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
25 # CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
26 #endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
27
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
28 CFLAGS = -Wall -g
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 CFLAGS += -O0
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 CFLAGS += -O2
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
33 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 export CFLAGS
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
36 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
37 STRIP_FLAG =
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
38 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
39 STRIP_FLAG = -s
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
40 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
41
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
42 clean:
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
43 $(testdir)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
44 -rm -f configure-stamp build-stamp debian/files debian/substvars
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
45 #ifneq ($(MAINT_BUILD),1)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
46 # # ---------- prevent automake etc. from being called
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
47 # # if you have changed anything, set MAINT_BUILD to 1
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
48 # touch configure.in && \
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
49 # touch Makefile.am docs/Makefile.am src/Makefile.am packages/Makefile.am packages/redhat/Makefile.am && \
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
50 # touch aclocal.m4 && \
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
51 # touch Makefile.in docs/Makefile.in src/Makefile.in packages/Makefile.in packages/redhat/Makefile.in && \
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
52 # touch configure && \
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
53 # touch stamp-h.in config.h.in
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
54 # # ---------- endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
55 #else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
56 # aclocal
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
57 # autoconf
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
58 # autoheader
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
59 # automake
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
60 # -rm -f config.log
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
61 #endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
62 -$(MAKE) -i distclean
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
63 -rm -rf debian/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
64
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
65 configure: configure-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
66 configure-stamp:
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
67 $(testdir)
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
68 ./configure $(CONFFLAGS) --prefix=/usr --mandir=/usr/share/man \
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
69 --with-configfile=/etc/news/noffle.conf \
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
70 --with-usersfile=/etc/news/noffle.users --enable-auth=no
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
71 touch configure-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
72
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
73 build: build-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
74 build-stamp: configure
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
75 $(testdir)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
76 $(MAKE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
77 touch build-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
78
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
79 binary: binary-arch
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
80
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
81 binary-indep:
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
82
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
83 binary-arch: build
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
84 $(testdir)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
85 $(testroot)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
86 -rm -rf debian/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
87
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
88 # installing binaries
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
89 install -o news -g news -m 6755 -D $(STRIP_FLAG) src/noffle $(BUILDDIR)/usr/bin/noffle
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
90 install -o root -g root -m 0755 -D debian/noffle-cronfetch $(BUILDDIR)/usr/sbin/noffle-cronfetch
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
91
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
92 # installing locking directory
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
93 install -d -o root -g root -m 0755 $(BUILDDIR)/var/lock
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
94 install -d -o news -g news -m 2755 $(BUILDDIR)/var/lock/noffle
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
95
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
96 # installing spool directories
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
97 install -d -o root -g root -m 0755 $(BUILDDIR)/var/spool
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
98 install -d -o news -g news -m 2755 $(SPOOLDIR)/data $(SPOOLDIR)/outgoing $(SPOOLDIR)/overview $(SPOOLDIR)/requested
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
99 ln -s ../../lock/noffle $(SPOOLDIR)/lock
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
100 chown news:news $(SPOOLDIR)/lock
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
101
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
102 # installing shared files
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
103 install -D -o root -g root -m 0644 debian/linda $(BUILDDIR)/usr/share/linda/overrides/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
104 install -D -o root -g root -m 0644 debian/lintian $(BUILDDIR)/usr/share/lintian/overrides/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
105 install -D -o root -g root -m 0644 debian/conf.debian $(BUILDDIR)/usr/share/noffle/conf.debian
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
106 install -D -o root -g root -m 0644 noffle.conf.example $(BUILDDIR)/usr/share/noffle/noffle.conf
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
107 install -D -o root -g root -m 0644 debian/slrn.sl $(BUILDDIR)/usr/share/slrn/macros/noffle.sl
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
108 install -D -o root -g root -m 0644 debian/gnus.el $(BUILDDIR)/usr/share/emacs/site-lisp/gnus/noffle.el
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
109
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
110 # installing manuals
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
111 install -d -o root -g root -m 0755 $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
112 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.1 > $(MANDIR)/man1/noffle.1
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
113 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.conf.5 > $(MANDIR)/man5/noffle.conf.5
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
114 chown root:root $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
115 chmod 0644 $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
116 install -o root -g root -m 0644 debian/noffle-cronfetch.8 $(MANDIR)/man8
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
117 find $(MANDIR) -type f -print0 | xargs -0 gzip -9
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
118
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
119 # installing documentation
323
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
120 install -D -o root -g root -m 0644 ChangeLog $(DOCDIR)/changelog
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
121 install -D -o root -g root -m 0644 debian/changelog $(DOCDIR)/changelog.Debian
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
122 install -o root -g root -m 0644 debian/copyright debian/README.Debian AUTHORS NEWS TODO docs/FAQ docs/INTERNALS docs/NOTES $(DOCDIR)
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
123 ln -s ../../noffle $(DOCDIR)/examples
326
f478d73876e7 [svn] added xinetd dependency option and example
godisch
parents: 323
diff changeset
124 install -D -o root -g root -m 0755 debian/xinetd $(DOCDIR)/examples/xinetd.conf
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
125 find $(DOCDIR) -type f \( -size +8 -o -name 'changelog*' \) -print0 | xargs -0 gzip -9
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
126
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
127 # installing config files
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
128 install -d -o root -g root -m 0755 $(BUILDDIR)/etc/news $(BUILDDIR)/etc/default
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
129 install -D -o root -g root -m 0644 debian/cron.d $(BUILDDIR)/etc/cron.d/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
130 install -D -o root -g root -m 0755 debian/cron.daily $(BUILDDIR)/etc/cron.daily/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
131 install -D -o root -g root -m 0755 debian/init $(BUILDDIR)/etc/init.d/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
132 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.paranoid/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
133 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.server/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
134 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.workstation/noffle
326
f478d73876e7 [svn] added xinetd dependency option and example
godisch
parents: 323
diff changeset
135 install -D -o root -g root -m 0755 debian/ip-up $(BUILDDIR)/etc/ppp/ip-up.d/noffle
f478d73876e7 [svn] added xinetd dependency option and example
godisch
parents: 323
diff changeset
136 install -D -o root -g root -m 0755 debian/ip-down $(BUILDDIR)/etc/ppp/ip-down.d/noffle
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
137
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
138 # installing packaging information
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
139 install -d -o root -g root -m 0755 $(DEBDIR)
323
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
140 install -o root -g root -m 0644 debian/control $(DEBDIR)
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
141 install -o root -g root -m 0755 debian/config debian/preinst debian/postinst debian/prerm debian/postrm $(DEBDIR)
307
a6e66cc358e8 [svn] output md5sums and conffiles
godisch
parents: 305
diff changeset
142 cd $(BUILDDIR) && find usr -type f -print0 | xargs -0 md5sum | tee DEBIAN/md5sums
a6e66cc358e8 [svn] output md5sums and conffiles
godisch
parents: 305
diff changeset
143 cd $(BUILDDIR) && find ./etc -type f | cut -c 2- | tee DEBIAN/conffiles
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
144 debconf-mergetemplate debian/templates.?? debian/templates > $(DEBDIR)/templates
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
145 chown root:root $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
146 chmod 0644 $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
147
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
148 # building Debian package
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
149 dpkg-shlibdeps $(BUILDDIR)/usr/bin/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
150 dpkg-gencontrol -isp -pnoffle -P$(BUILDDIR)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
151 dpkg --build $(BUILDDIR) ..
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
152 # binary target finished
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
153
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
154 .PHONY: clean configure build binary binary-indep binary-arch