4 subdirs_nobuild=backup sync-accounts scripts
6 packages_indep= chiark-backup chiark-scripts
7 packages_arch= chiark-rwbuffer chiark-really chiark-utils-bin
8 packages= $(packages_indep) $(packages_arch)
16 set -e; for s in $(subdirs_build); do $(MAKE) -C $$s all; done
22 set -e; for s in $(subdirs_build); do \
23 $(MAKE) -C $$s -i distclean || \
24 $(MAKE) -C $$s -f Makefile.in distclean; \
26 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
32 set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \
33 $(MAKE) -C $$s install install-docs install-examples \
36 varlib=$t/$$s/var/lib \
37 mandir=$t/$$s/usr/share/man; \
40 mv $t/cprogs $t/chiark-utils-bin
42 cp -a debian/tmp/sync-accounts/* debian/tmp/scripts/.
43 rm -r debian/tmp/sync-accounts
44 mv debian/tmp/scripts debian/tmp/chiark-scripts
45 mv debian/tmp/backup debian/tmp/chiark-backup
47 set -e; for p in $(packages); do \
48 install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \
49 cp debian/copyright debian/changelog \
50 $t/$$p/usr/share/doc/$$p/; \
52 $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \
53 gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \
56 install -d $t/chiark-rwbuffer/usr/bin
57 install -d $t/chiark-rwbuffer/usr/share/man/man1
58 cd $t/chiark-utils-bin/usr/bin && \
59 mv readbuffer writebuffer $t/chiark-rwbuffer/usr/bin/
60 cd $t/chiark-utils-bin/usr/share/man/man1 && \
61 mv readbuffer.1 writebuffer.1 $t/chiark-rwbuffer/usr/share/man/man1/
63 install -d $t/chiark-really/usr/sbin
64 install -d $t/chiark-really/usr/share/man/man8
65 cd $t/chiark-utils-bin/usr/sbin && \
66 mv really $t/chiark-really/usr/sbin/
67 strip --strip-unneeded $t/chiark-really/usr/sbin/really
68 cd $t/chiark-utils-bin/usr/share/man/man8 && \
69 mv really.8 $t/chiark-really/usr/share/man/man8/
70 rm $t/chiark-utils-bin/usr/sbin/trivsoundd \
71 $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
72 rmdir $t/chiark-utils-bin/usr/sbin \
73 $t/chiark-utils-bin/usr/share/man/man8
75 gzip -9f $t/*/usr/share/man/man*/*
77 binary-hook-chiark-backup:
78 binary-hook-chiark-rwbuffer:
79 binary-hook-sync-accounts:
80 binary-hook-chiark-scripts:
81 binary-hook-chiark-really:
82 binary-hook-chiark-utils-bin:
85 set -e; for f in preinst postinst prerm postrm conffiles; do \
86 test -f debian/$p/$$f || continue; \
87 cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
88 chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
90 dpkg-gencontrol -p$p -P$t/$p -Tdebian/sv-$p
91 chown -R root.root debian/tmp
92 chmod -R g-ws debian/tmp
93 debian/rules binary-hook-$p
96 binary-indep: checkroot build binary-prep
97 set -e; for p in $(packages_indep); do \
98 debian/rules binary-one p=$$p; done
100 binary-arch: checkroot build binary-prep
102 dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
103 $t/chiark-rwbuffer/usr/bin/*
104 dpkg-shlibdeps -Tdebian/sv-chiark-really \
105 $t/chiark-really/usr/sbin/*
106 dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin \
107 $t/chiark-utils-bin/usr/bin/*
108 set -e; for p in $(packages_arch); \
109 do debian/rules binary-one p=$$p; done
112 test -f cprogs/writebuffer.c
115 # Below here is fairly generic really
117 binary: binary-indep binary-arch
120 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
124 test root = "`whoami`"
126 .PHONY: binary binary-arch binary-indep clean checkroot