annotate debian/rules @ 307:a6e66cc358e8 noffle

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