6 subdirs_nobuild=backup sync-accounts scripts
8 packages_indep= chiark-backup chiark-scripts
9 packages_arch= chiark-rwbuffer chiark-really chiark-utils-bin
10 packages= $(packages_indep) $(packages_arch)
18 set -e; for s in $(subdirs_build); do $(MAKE) -C $$s all; done
24 set -e; for s in $(subdirs_build); do \
25 $(MAKE) -C $$s -i distclean || \
26 $(MAKE) -C $$s -f Makefile.in distclean; \
28 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
34 set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \
35 $(MAKE) -C $$s install install-docs install-examples \
38 varlib=$t/$$s/var/lib \
39 mandir=$t/$$s/usr/share/man; \
42 mv $t/cprogs $t/chiark-utils-bin
44 cp -a debian/tmp/sync-accounts/* debian/tmp/scripts/.
45 rm -r debian/tmp/sync-accounts
46 mv debian/tmp/scripts debian/tmp/chiark-scripts
47 mv debian/tmp/backup debian/tmp/chiark-backup
49 set -e; for p in $(packages); do \
50 install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \
51 cp debian/copyright debian/changelog \
52 $t/$$p/usr/share/doc/$$p/; \
54 $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \
55 gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \
58 install -d $t/chiark-rwbuffer/usr/bin
59 install -d $t/chiark-rwbuffer/usr/share/man/man1
60 cd $t/chiark-utils-bin/usr/bin && \
61 mv readbuffer writebuffer $t/chiark-rwbuffer/usr/bin/
62 cd $t/chiark-utils-bin/usr/share/man/man1 && \
63 mv readbuffer.1 writebuffer.1 $t/chiark-rwbuffer/usr/share/man/man1/
65 install -d $t/chiark-backup/usr/share/man/man1
66 cp backup/man/*.1 $t/chiark-backup/usr/share/man/man1/
67 cd $t/chiark-backup/usr/share/man/man1 && \
69 mv "$$m" backup-"$$m"; \
72 $t/chiark-backup/usr/share/doc/chiark-backup/examples/chiark/settings.sh \
73 $t/chiark-backup/etc/chiark-backup/settings.sh
75 install -d $t/chiark-really/usr/sbin
76 install -d $t/chiark-really/usr/share/man/man8
77 cd $t/chiark-utils-bin/usr/sbin && \
78 mv really $t/chiark-really/usr/sbin/
79 cd $t/chiark-utils-bin/usr/share/man/man8 && \
80 mv really.8 $t/chiark-really/usr/share/man/man8/
81 rm $t/chiark-utils-bin/usr/sbin/trivsoundd \
82 $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
83 rmdir $t/chiark-utils-bin/usr/sbin \
84 $t/chiark-utils-bin/usr/share/man/man8
86 gzip -9f $t/*/usr/share/man/man*/*
88 binary-hook-chiark-backup:
89 binary-hook-chiark-rwbuffer:
90 binary-hook-sync-accounts:
91 binary-hook-chiark-scripts:
92 binary-hook-chiark-really:
93 binary-hook-chiark-utils-bin:
96 set -e; for f in preinst postinst prerm postrm conffiles; do \
97 test -f debian/$p/$$f || continue; \
98 cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
99 chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
101 dpkg-gencontrol -isp -p$p -P$t/$p -Tdebian/sv-$p
102 chown -R root.root debian/tmp
103 chmod -R g-ws debian/tmp
104 debian/rules binary-hook-$p
105 dpkg --build $t/$p ..
107 binary-indep: checkroot build binary-prep
108 set -e; for p in $(packages_indep); do \
109 debian/rules binary-one p=$$p; done
111 binary-arch: checkroot build binary-prep
113 set -ex; for p in chiark-really chiark-utils-bin chiark-rwbuffer; do \
114 dh_strip -p$$p -Pdebian/tmp/$$p; done
115 dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
116 $t/chiark-rwbuffer/usr/bin/*
117 dpkg-shlibdeps -Tdebian/sv-chiark-really \
118 $t/chiark-really/usr/sbin/*
119 set -e; for f in $t/chiark-utils-bin/usr/bin/*; do \
121 */xacpi-simple) d=Suggests ;; \
122 */watershed|*/summer) d=Recommends ;; \
127 dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin $$a
129 -e' next unless m/^shlibs:/; '\
130 -e' s/$$/,/; s/=/=, /; '\
131 -e' s/, libgmp3(?:c2)?,/, libgmp3 | libgmp3c2,/; '\
132 -e' s/=, /=/; s/,$$//; '\
134 set -e; for p in $(packages_arch); \
135 do debian/rules binary-one p=$$p; done
138 test -f cprogs/writebuffer.c
141 # Below here is fairly generic really
143 binary: binary-indep binary-arch
146 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
150 test root = "`whoami`"
152 .PHONY: binary binary-arch binary-indep clean checkroot