Mercurial > noffle
comparison debian/rules @ 308:1439f5692d18 noffle
[svn] code cleanup
| author | godisch |
|---|---|
| date | Mon, 17 Feb 2003 17:40:04 +0000 |
| parents | a6e66cc358e8 |
| children | 67ce1ddf7313 |
comparison
equal
deleted
inserted
replaced
| 307:a6e66cc358e8 | 308:1439f5692d18 |
|---|---|
| 1 #!/usr/bin/make -f | 1 #!/usr/bin/make -f |
| 2 # $Id: rules 441 2003-02-17 17:11:14Z godisch $ | 2 # $Id: rules 442 2003-02-17 17:40:04Z godisch $ |
| 3 | 3 |
| 4 #export MAINT_BUILD=1 | 4 #export MAINT_BUILD=1 |
| 5 | 5 |
| 6 BUILDDIR = debian/noffle | 6 BUILDDIR = debian/noffle |
| 7 DEBDIR = $(BUILDDIR)/DEBIAN | 7 DEBDIR = $(BUILDDIR)/DEBIAN |
| 8 DOCDIR = $(BUILDDIR)/usr/share/doc/noffle | 8 DOCDIR = $(BUILDDIR)/usr/share/doc/noffle |
| 9 SPOOLDIR = $(BUILDDIR)/var/spool/noffle | 9 SPOOLDIR = $(BUILDDIR)/var/spool/noffle |
| 10 MANDIR = $(BUILDDIR)/usr/share/man | 10 MANDIR = $(BUILDDIR)/usr/share/man |
| 11 | |
| 12 testdir = test -f src/noffle.c -a -f debian/rules | 11 testdir = test -f src/noffle.c -a -f debian/rules |
| 13 testroot = test x`whoami` = xroot | 12 testroot = test x`whoami` = xroot |
| 14 INSTALL = install -o root -g root | |
| 15 | 13 |
| 16 # FOR AUTOCONF 2.13 ONLY | 14 # FOR AUTOCONF 2.13 ONLY |
| 17 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) | 15 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
| 18 CONFFLAGS += $(DEB_HOST_GNU_TYPE) | 16 CONFFLAGS += $(DEB_HOST_GNU_TYPE) |
| 19 else | 17 else |
| 65 -rm -rf debian/noffle | 63 -rm -rf debian/noffle |
| 66 | 64 |
| 67 configure: configure-stamp | 65 configure: configure-stamp |
| 68 configure-stamp: | 66 configure-stamp: |
| 69 $(testdir) | 67 $(testdir) |
| 70 ./configure $(CONFFLAGS) --prefix=/usr --mandir=/usr/share/man --with-configfile=/etc/news/noffle.conf --with-usersfile=/etc/news/noffle.users --enable-auth=no | 68 ./configure $(CONFFLAGS) --prefix=/usr --mandir=/usr/share/man \ |
| 69 --with-configfile=/etc/news/noffle.conf \ | |
| 70 --with-usersfile=/etc/news/noffle.users --enable-auth=no | |
| 71 touch configure-stamp | 71 touch configure-stamp |
| 72 | 72 |
| 73 build: build-stamp | 73 build: build-stamp |
| 74 build-stamp: configure | 74 build-stamp: configure |
| 75 $(testdir) | 75 $(testdir) |
| 85 $(testroot) | 85 $(testroot) |
| 86 -rm -rf debian/noffle | 86 -rm -rf debian/noffle |
| 87 | 87 |
| 88 # installing binaries | 88 # installing binaries |
| 89 install -o news -g news -m 6755 -D $(STRIP_FLAG) src/noffle $(BUILDDIR)/usr/bin/noffle | 89 install -o news -g news -m 6755 -D $(STRIP_FLAG) src/noffle $(BUILDDIR)/usr/bin/noffle |
| 90 $(INSTALL) -m 0755 -D debian/noffle-cronfetch $(BUILDDIR)/usr/sbin/noffle-cronfetch | 90 install -o root -g root -m 0755 -D debian/noffle-cronfetch $(BUILDDIR)/usr/sbin/noffle-cronfetch |
| 91 | 91 |
| 92 # installing locking directory | 92 # installing locking directory |
| 93 $(INSTALL) -d $(BUILDDIR)/var/lock | 93 install -d -o root -g root -m 0755 $(BUILDDIR)/var/lock |
| 94 install -o news -g news -m 2755 -d $(BUILDDIR)/var/lock/noffle | 94 install -d -o news -g news -m 2755 $(BUILDDIR)/var/lock/noffle |
| 95 | 95 |
| 96 # installing spool directories | 96 # installing spool directories |
| 97 $(INSTALL) -d $(BUILDDIR)/var/spool | 97 install -d -o root -g root -m 0755 $(BUILDDIR)/var/spool |
| 98 install -o news -g news -m 2755 -d $(SPOOLDIR)/data $(SPOOLDIR)/outgoing $(SPOOLDIR)/overview $(SPOOLDIR)/requested | 98 install -d -o news -g news -m 2755 $(SPOOLDIR)/data $(SPOOLDIR)/outgoing $(SPOOLDIR)/overview $(SPOOLDIR)/requested |
| 99 ln -s ../../lock/noffle $(SPOOLDIR)/lock | 99 ln -s ../../lock/noffle $(SPOOLDIR)/lock |
| 100 chown news:news $(SPOOLDIR)/lock | 100 chown news:news $(SPOOLDIR)/lock |
| 101 | 101 |
| 102 # installing shared files | 102 # installing shared files |
| 103 $(INSTALL) -m 0644 -D debian/linda $(BUILDDIR)/usr/share/linda/overrides/noffle | 103 install -D -o root -g root -m 0644 debian/linda $(BUILDDIR)/usr/share/linda/overrides/noffle |
| 104 $(INSTALL) -m 0644 -D debian/lintian $(BUILDDIR)/usr/share/lintian/overrides/noffle | 104 install -D -o root -g root -m 0644 debian/lintian $(BUILDDIR)/usr/share/lintian/overrides/noffle |
| 105 $(INSTALL) -m 0644 -D debian/conf.debian $(BUILDDIR)/usr/share/noffle/conf.debian | 105 install -D -o root -g root -m 0644 debian/conf.debian $(BUILDDIR)/usr/share/noffle/conf.debian |
| 106 $(INSTALL) -m 0644 -D noffle.conf.example $(BUILDDIR)/usr/share/noffle/noffle.conf | 106 install -D -o root -g root -m 0644 noffle.conf.example $(BUILDDIR)/usr/share/noffle/noffle.conf |
| 107 $(INSTALL) -m 0644 -D debian/slrn.sl $(BUILDDIR)/usr/share/slrn/macros/noffle.sl | 107 install -D -o root -g root -m 0644 debian/slrn.sl $(BUILDDIR)/usr/share/slrn/macros/noffle.sl |
| 108 $(INSTALL) -m 0644 -D debian/gnus.el $(BUILDDIR)/usr/share/emacs/site-lisp/gnus/noffle.el | 108 install -D -o root -g root -m 0644 debian/gnus.el $(BUILDDIR)/usr/share/emacs/site-lisp/gnus/noffle.el |
| 109 | 109 |
| 110 # installing manuals | 110 # installing manuals |
| 111 $(INSTALL) -d $(MANDIR)/man1 $(MANDIR)/man5 | 111 install -d -o root -g root -m 0755 $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8 |
| 112 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.1 > $(MANDIR)/man1/noffle.1 | 112 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.1 > $(MANDIR)/man1/noffle.1 |
| 113 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.conf.5 > $(MANDIR)/man5/noffle.conf.5 | 113 sed 's@/etc/noffle\.conf@/etc/news/noffle.conf@g' docs/noffle.conf.5 > $(MANDIR)/man5/noffle.conf.5 |
| 114 chown root:root $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5 | 114 chown root:root $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5 |
| 115 chmod 0644 $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5 | 115 chmod 0644 $(MANDIR)/man1/noffle.1 $(MANDIR)/man5/noffle.conf.5 |
| 116 $(INSTALL) -m 0644 -D debian/noffle-cronfetch.8 $(MANDIR)/man8/noffle-cronfetch.8 | 116 install -o root -g root -m 0644 debian/noffle-cronfetch.8 $(MANDIR)/man8 |
| 117 find $(MANDIR) -type f -print0 | xargs -0 gzip -9 | 117 find $(MANDIR) -type f -print0 | xargs -0 gzip -9 |
| 118 | 118 |
| 119 # installing documentation | 119 # installing documentation |
| 120 $(INSTALL) -d $(DOCDIR) | 120 install -d -o root -g root -m 0755 $(DOCDIR) |
| 121 $(INSTALL) -m 0644 AUTHORS NEWS TODO docs/FAQ docs/INTERNALS docs/NOTES $(DOCDIR) | 121 install -o root -g root -m 0644 AUTHORS NEWS TODO docs/FAQ docs/INTERNALS docs/NOTES $(DOCDIR) |
| 122 find $(DOCDIR) -type f -size +8 -print0 | xargs -0 gzip -9 | 122 install -D -o root -g root -m 0644 debian/changelog $(DOCDIR)/changelog.Debian |
| 123 $(INSTALL) -m 0644 -D debian/changelog $(DOCDIR)/changelog.Debian | 123 install -D -o root -g root -m 0644 ChangeLog $(DOCDIR)/changelog |
| 124 $(INSTALL) -m 0644 -D ChangeLog $(DOCDIR)/changelog | 124 install -o root -g root -m 0644 debian/copyright $(DOCDIR) |
| 125 gzip -9 $(DOCDIR)/changelog $(DOCDIR)/changelog.Debian | 125 install -o root -g root -m 0644 debian/README.Debian $(DOCDIR) |
| 126 $(INSTALL) -m 0644 debian/copyright $(DOCDIR) | |
| 127 $(INSTALL) -m 0644 debian/README.Debian $(DOCDIR) | |
| 128 ln -s ../../noffle $(DOCDIR)/examples | 126 ln -s ../../noffle $(DOCDIR)/examples |
| 127 find $(DOCDIR) -type f \( -size +8 -o -name 'changelog*' \) -print0 | xargs -0 gzip -9 | |
| 129 | 128 |
| 130 # installing config files | 129 # installing config files |
| 131 $(INSTALL) -d $(BUILDDIR)/etc/news $(BUILDDIR)/etc/default | 130 install -d -o root -g root -m 0755 $(BUILDDIR)/etc/news $(BUILDDIR)/etc/default |
| 132 $(INSTALL) -m 0644 -D debian/cron.d $(BUILDDIR)/etc/cron.d/noffle | 131 install -D -o root -g root -m 0644 debian/cron.d $(BUILDDIR)/etc/cron.d/noffle |
| 133 $(INSTALL) -m 0755 -D debian/cron.daily $(BUILDDIR)/etc/cron.daily/noffle | 132 install -D -o root -g root -m 0755 debian/cron.daily $(BUILDDIR)/etc/cron.daily/noffle |
| 134 $(INSTALL) -m 0755 -D debian/init $(BUILDDIR)/etc/init.d/noffle | 133 install -D -o root -g root -m 0755 debian/init $(BUILDDIR)/etc/init.d/noffle |
| 135 $(INSTALL) -m 0755 -D debian/ip-up $(BUILDDIR)/etc/ppp/ip-up.d/noffle | 134 install -D -o root -g root -m 0755 debian/ip-up $(BUILDDIR)/etc/ppp/ip-up.d/noffle |
| 136 $(INSTALL) -m 0755 -D debian/ip-down $(BUILDDIR)/etc/ppp/ip-down.d/noffle | 135 install -D -o root -g root -m 0755 debian/ip-down $(BUILDDIR)/etc/ppp/ip-down.d/noffle |
| 137 $(INSTALL) -m 0644 -D debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.paranoid/noffle | 136 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.paranoid/noffle |
| 138 $(INSTALL) -m 0644 -D debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.server/noffle | 137 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.server/noffle |
| 139 $(INSTALL) -m 0644 -D debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.workstation/noffle | 138 install -D -o root -g root -m 0644 debian/logcheck $(BUILDDIR)/etc/logcheck/ignore.d.workstation/noffle |
| 140 | 139 |
| 141 # installing packaging information | 140 # installing packaging information |
| 142 $(INSTALL) -d $(DEBDIR) | 141 install -d -o root -g root -m 0755 $(DEBDIR) |
| 143 $(INSTALL) -m 0755 debian/config $(DEBDIR) | 142 install -o root -g root -m 0755 debian/config $(DEBDIR) |
| 144 $(INSTALL) -m 0644 debian/control $(DEBDIR) | 143 install -o root -g root -m 0644 debian/control $(DEBDIR) |
| 145 $(INSTALL) -m 0755 debian/postinst $(DEBDIR) | 144 install -o root -g root -m 0755 debian/postinst $(DEBDIR) |
| 146 $(INSTALL) -m 0755 debian/postrm $(DEBDIR) | 145 install -o root -g root -m 0755 debian/postrm $(DEBDIR) |
| 147 $(INSTALL) -m 0755 debian/preinst $(DEBDIR) | 146 install -o root -g root -m 0755 debian/preinst $(DEBDIR) |
| 148 $(INSTALL) -m 0755 debian/prerm $(DEBDIR) | 147 install -o root -g root -m 0755 debian/prerm $(DEBDIR) |
| 149 cd $(BUILDDIR) && find usr -type f -print0 | xargs -0 md5sum | tee DEBIAN/md5sums | 148 cd $(BUILDDIR) && find usr -type f -print0 | xargs -0 md5sum | tee DEBIAN/md5sums |
| 150 cd $(BUILDDIR) && find ./etc -type f | cut -c 2- | tee DEBIAN/conffiles | 149 cd $(BUILDDIR) && find ./etc -type f | cut -c 2- | tee DEBIAN/conffiles |
| 151 debconf-mergetemplate debian/templates.?? debian/templates > $(DEBDIR)/templates | 150 debconf-mergetemplate debian/templates.?? debian/templates > $(DEBDIR)/templates |
| 152 chown root:root $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates | 151 chown root:root $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates |
| 153 chmod 0644 $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates | 152 chmod 0644 $(DEBDIR)/md5sums $(DEBDIR)/conffiles $(DEBDIR)/templates |
| 154 | 153 |
| 155 # building Debian package | 154 # building Debian package |
| 156 dpkg-shlibdeps $(BUILDDIR)/usr/bin/noffle | 155 dpkg-shlibdeps $(BUILDDIR)/usr/bin/noffle |
| 157 dpkg-gencontrol -isp -pnoffle -P$(BUILDDIR) | 156 dpkg-gencontrol -isp -pnoffle -P$(BUILDDIR) |
| 158 dpkg --build $(BUILDDIR) .. | 157 dpkg --build $(BUILDDIR) .. |
