annotate debian/rules @ 416:fbdcd908aa7c noffle

[svn] fixed udpate-inetd
author godisch
date Fri, 20 Jun 2003 06:46:49 +0100
parents 3d3a0dab6011
children 7a5ec3f900e1
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
394
3d3a0dab6011 [svn] small update
godisch
parents: 379
diff changeset
2 # $Id: rules 536 2003-05-24 18:48:30Z godisch $
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
3
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
4 BUILDDIR = debian/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
5 DEBDIR = $(BUILDDIR)/DEBIAN
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
6 DOCDIR = $(BUILDDIR)/usr/share/doc/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
7 SPOOLDIR = $(BUILDDIR)/var/spool/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
8 MANDIR = $(BUILDDIR)/usr/share/man
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
9 testdir = test -f src/noffle.c -a -f debian/rules
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
10 testroot = test x`whoami` = xroot
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
11
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
12 # FOR AUTOCONF 2.13 ONLY
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
13 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
14 CONFFLAGS += $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
15 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
16 CONFFLAGS += --host $(DEB_BUILD_GNU_TYPE) --build $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
17 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
18
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
19 # FOR AUTOCONF 2.52 AND NEWER ONLY
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
20 #ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
21 # CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
22 #else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 # CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 #endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
25
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
26 CFLAGS = -Wall -g
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
27 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
28 CFLAGS += -O0
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 CFLAGS += -O2
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 export CFLAGS
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
33
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35 STRIP_FLAG =
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
36 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
37 STRIP_FLAG = -s
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
38 endif
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
39
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
40 clean:
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
41 $(testdir)
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
42 rm -f configure-stamp build-stamp debian/files debian/substvars
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
43 -$(MAKE) -i distclean
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
44 rm -rf debian/noffle
394
3d3a0dab6011 [svn] small update
godisch
parents: 379
diff changeset
45 -cat `ls -r debian/patches/*.diff` /dev/null | patch -RENtp1 -r debian/rejected --no-backup-if-mismatch
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
46 rm -f debian/rejected
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
47
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
48 configure-stamp: configure
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
49 $(testdir)
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
50 -cat debian/patches/*.diff | patch -Ntp1 -r debian/rejected --no-backup-if-mismatch
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
51 ./configure $(CONFFLAGS) --prefix=/usr --mandir=/usr/share/man \
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
52 --with-configfile=/etc/news/noffle.conf \
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
53 --with-usersfile=/etc/news/noffle.users --enable-auth=no
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
54 touch configure-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
55
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
56 build: build-stamp
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
57 build-stamp: configure-stamp
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
58 $(testdir)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
59 $(MAKE)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
60 touch build-stamp
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
61
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
62 binary: binary-arch
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
63
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
64 binary-indep:
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
65
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
66 binary-arch: build
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
67 $(testdir)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
68 $(testroot)
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
69 rm -rf debian/noffle
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
70
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
71 # installing binaries
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
72 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
73 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
74
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
75 # installing locking directory
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
76 install -d -o root -g root -m 0755 $(BUILDDIR)/var/lock
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
77 install -d -o news -g news -m 2755 $(BUILDDIR)/var/lock/noffle
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
78
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
79 # installing spool directories
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
80 install -d -o root -g root -m 0755 $(BUILDDIR)/var/spool
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
81 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
82 ln -s ../../lock/noffle $(SPOOLDIR)/lock
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
83 chown news:news $(SPOOLDIR)/lock
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
84
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
85 # installing shared files
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
86 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
87 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
88 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
89 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
90 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
91 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
92
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
93 # installing manuals
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
94 install -d -o root -g root -m 0755 $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
95 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
96 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
97 chown root:root $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
98 chmod 0644 $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
99 install -o root -g root -m 0644 debian/noffle-cronfetch.8 $(MANDIR)/man8
394
3d3a0dab6011 [svn] small update
godisch
parents: 379
diff changeset
100 find $(MANDIR) -type f -print0 | xargs -0 gzip -9n
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
101
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
102 # installing documentation
323
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
103 install -D -o root -g root -m 0644 ChangeLog $(DOCDIR)/changelog
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
104 install -D -o root -g root -m 0644 debian/changelog $(DOCDIR)/changelog.Debian
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
105 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
106 ln -s ../../noffle $(DOCDIR)/examples
327
a9d3ea0478c1 [svn] fixed permissions of xinetd example
godisch
parents: 326
diff changeset
107 install -D -o root -g root -m 0644 debian/xinetd $(DOCDIR)/examples/xinetd.conf
394
3d3a0dab6011 [svn] small update
godisch
parents: 379
diff changeset
108 find $(DOCDIR) -type f \( -size +8 -o -name 'changelog*' \) -print0 | xargs -0 gzip -9n
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
109
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
110 # installing config files
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
111 install -d -o root -g root -m 0755 $(BUILDDIR)/etc/news $(BUILDDIR)/etc/default
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
112 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
113 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
114 install -D -o root -g root -m 0755 debian/init $(BUILDDIR)/etc/init.d/noffle
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
115 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
116 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
117 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
118 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
119 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
120
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
121 # installing packaging information
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
122 install -d -o root -g root -m 0755 $(DEBDIR)
323
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
123 install -o root -g root -m 0644 debian/control $(DEBDIR)
67ce1ddf7313 [svn] cleanup
godisch
parents: 308
diff changeset
124 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
125 cd $(BUILDDIR) && find usr -type f -print0 | xargs -0 md5sum | tee DEBIAN/md5sums
a6e66cc358e8 [svn] output md5sums and conffiles
godisch
parents: 305
diff changeset
126 cd $(BUILDDIR) && find ./etc -type f | cut -c 2- | tee DEBIAN/conffiles
338
fa7a42b18bc8 [svn] transition to po-debconf
godisch
parents: 327
diff changeset
127 po2debconf debian/templates > $(DEBDIR)/templates
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
128 chown root:root $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates
308
1439f5692d18 [svn] code cleanup
godisch
parents: 307
diff changeset
129 chmod 0644 $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
130
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
131 # building Debian package
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
132 dpkg-shlibdeps $(BUILDDIR)/usr/bin/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
133 dpkg-gencontrol -isp -pnoffle -P$(BUILDDIR)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
134 dpkg --build $(BUILDDIR) ..
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
135 # binary target finished
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
136
369
31295db432f5 [svn] added upstream compatbile patching
godisch
parents: 338
diff changeset
137 .PHONY: clean build binary binary-indep binary-arch