1 | #!/usr/bin/make -f |
---|
2 | # debian.rules file for Cygnus Network Security Version 4 |
---|
3 | # based on: |
---|
4 | ## Sample debian.rules file - for GNU Hello (1.3). |
---|
5 | ## Copyright 1994,1995 by Ian Jackson. |
---|
6 | ## I hereby give you perpetual unlimited permission to copy, |
---|
7 | ## modify and relicense this file, provided that you do not remove |
---|
8 | ## my name from the file itself. (I assert my moral right of |
---|
9 | ## paternity under the Copyright, Designs and Patents Act 1988.) |
---|
10 | # changes: |
---|
11 | # handle info specially |
---|
12 | # fake source construction |
---|
13 | # need to fake diff as well? |
---|
14 | |
---|
15 | package=cns4 |
---|
16 | version=96q1 |
---|
17 | debian=1 |
---|
18 | |
---|
19 | # The next section may have to be extensively modified |
---|
20 | |
---|
21 | build: |
---|
22 | $(checkdir) |
---|
23 | ./configure |
---|
24 | $(MAKE) DBG=-O2 LEX=flex |
---|
25 | touch build |
---|
26 | |
---|
27 | clean: |
---|
28 | $(checkdir) |
---|
29 | -rm -f build |
---|
30 | -$(MAKE) -i distclean |
---|
31 | -rm -rf debian-tmp *~ |
---|
32 | |
---|
33 | binary: checkroot build |
---|
34 | -rm -rf debian-tmp |
---|
35 | mkdir debian-tmp debian-tmp/DEBIAN |
---|
36 | install -d debian-tmp/usr/doc/copyright |
---|
37 | sed -e '2s/=/$(version)-$(debian)/' \ |
---|
38 | debian.control > debian-tmp/DEBIAN/control |
---|
39 | cp debian.postinst debian-tmp/DEBIAN/postinst |
---|
40 | cp debian.prerm debian-tmp/DEBIAN/prerm |
---|
41 | chmod +x debian-tmp/DEBIAN/{postinst,prerm} |
---|
42 | $(MAKE) CFLAGS=-O2 LDFLAGS=-s DESTDIR=`pwd`/debian-tmp install |
---|
43 | $(MAKE) CFLAGS=-O2 LDFLAGS=-s DESTDIR=`pwd`/debian-tmp info |
---|
44 | install -d debian-tmp/usr/info |
---|
45 | cp doc/*.info* debian-tmp/usr/info/ |
---|
46 | gzip -9v debian-tmp/usr/info/* |
---|
47 | cp debian.README debian-tmp/usr/doc/copyright/$(package) |
---|
48 | # chown -R root.root debian-tmp |
---|
49 | chmod -R g-ws debian-tmp |
---|
50 | strip debian-tmp/usr/kerberos/bin/* |
---|
51 | -strip debian-tmp/usr/kerberos/etc/* |
---|
52 | dpkg --build debian-tmp |
---|
53 | mv debian-tmp.deb ../$(package)-$(version)-$(debian).deb |
---|
54 | |
---|
55 | define checkdir |
---|
56 | test -f Makefile.in |
---|
57 | endef |
---|
58 | |
---|
59 | # Below here is fairly generic really |
---|
60 | |
---|
61 | source: clean |
---|
62 | chmod +x debian.rules |
---|
63 | cd .. && \ |
---|
64 | ln -s kerberos $(package)-$(version) && \ |
---|
65 | tar chf $(package)-$(version)-$(debian).tar $(package)-$(version) && \ |
---|
66 | gzip -9vf $(package)-$(version)-$(debian).tar |
---|
67 | |
---|
68 | diff: clean |
---|
69 | cd .. && \ |
---|
70 | (diff -ruN $(package)-$(version).orig $(package)-$(version) \ |
---|
71 | >$(package)-$(version)-$(debian).diff; [ $$? = 1 ]) && \ |
---|
72 | gzip -9vf $(package)-$(version)-$(debian).diff |
---|
73 | |
---|
74 | checkroot: |
---|
75 | $(checkdir) |
---|
76 | -test root = "`whoami`" |
---|
77 | |
---|
78 | .PHONY: binary source diff clean checkroot |
---|