chiark / gitweb /
Build bugfixes (re version.h) and changelog updated.
[userv.git] / debian / rules
1 #!/usr/bin/make -f
2
3 package=userv
4
5 build:
6         $(checkdir)
7         ./configure --prefix=/usr
8         $(MAKE)
9         $(MAKE) spec.html
10         touch build
11
12 clean:
13         $(checkdir)
14         -rm -f build
15         -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
16         -rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
17
18 binary-indep:   checkroot build
19         $(checkdir)
20 # There are no architecture-independent files to be uploaded
21 # generated by this package.  If there were any they would be
22 # made here.
23
24 binary-arch:    checkroot build
25         $(checkdir)
26         -rm -rf debian/tmp
27         install -d debian/tmp/{DEBIAN,etc/init.d} debian/tmp/usr/{sbin,bin}
28         install -d debian/tmp/etc/userv/{override,default}.d
29         install -d debian/tmp/usr/doc/$(package)/examples/
30         install -d debian/tmp/var/run/$(package)/
31         cp debian/{postinst,prerm,postrm,conffiles} debian/tmp/DEBIAN/.
32         cp debian/initd debian/tmp/etc/init.d/userv
33         chmod +x debian/tmp/DEBIAN/{postinst,prerm,postrm}
34         chmod +x debian/tmp/etc/init.d/userv
35         $(MAKE) LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \
36                 prefix=debian/tmp/usr etcdir=debian/tmp/etc install
37         cp debian/copyright debian/tmp/usr/doc/$(package)/.
38         cp debian/changelog debian/tmp/usr/doc/$(package)/changelog
39         cp README debian/tmp/usr/doc/$(package)/README.upstream
40         cp system.default system.override debian/tmp/usr/doc/$(package)/examples
41         gzip -9v debian/tmp/usr/doc/$(package)/changelog
42         ln -s changelog.gz debian/tmp/usr/doc/$(package)/changelog.Debian.gz
43         cp -a spec.html debian/tmp/usr/doc/$(package)/
44         dpkg-shlibdeps daemon client
45         dpkg-gencontrol
46         chown -R root.root debian/tmp
47         chmod -R g-ws debian/tmp
48         chmod 700 debian/tmp/var/run/userv
49         dpkg --build debian/tmp ..
50
51 define checkdir
52         test -f overlord.c -a -f lexer.l.m4 -a -f debian/rules
53 endef
54
55 # Below here is fairly generic really
56
57 binary:         binary-indep binary-arch
58
59 source diff:
60         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
61
62 checkroot:
63         $(checkdir)
64         test root = "`whoami`"
65
66 .PHONY: binary binary-arch binary-indep clean checkroot