5 subdirs_build_arch= cprogs
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_arch); do $(MAKE) -C $$s all; done
27 set -e; for s in $(subdirs_build_arch); do \
28 $(MAKE) -C $$s -i distclean || \
29 $(MAKE) -C $$s -f Makefile.in distclean; \
31 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
37 set -e; for s in $(subdirs_build_arch) $(subdirs_nobuild); do \
38 $(MAKE) -C $$s install install-docs install-examples \
41 varlib=$t/$$s/var/lib \
42 mandir=$t/$$s/usr/share/man; \
45 mv $t/cprogs $t/chiark-utils-bin
47 cp -a debian/tmp/sync-accounts/* debian/tmp/scripts/.
48 rm -r debian/tmp/sync-accounts
49 mv debian/tmp/scripts debian/tmp/chiark-scripts
50 mv debian/tmp/backup debian/tmp/chiark-backup
52 set -e; for p in $(packages); do \
53 install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \
54 cp debian/copyright debian/changelog \
55 $t/$$p/usr/share/doc/$$p/; \
57 $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \
58 gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \
61 install -d $t/chiark-rwbuffer/usr/bin
62 install -d $t/chiark-rwbuffer/usr/share/man/man1
63 cd $t/chiark-utils-bin/usr/bin && \
64 mv readbuffer writebuffer $t/chiark-rwbuffer/usr/bin/
65 cd $t/chiark-utils-bin/usr/share/man/man1 && \
66 mv readbuffer.1 writebuffer.1 $t/chiark-rwbuffer/usr/share/man/man1/
68 install -d $t/chiark-backup/usr/share/man/man1
69 cp backup/man/*.1 $t/chiark-backup/usr/share/man/man1/
70 cd $t/chiark-backup/usr/share/man/man1 && \
72 mv "$$m" backup-"$$m"; \
75 $t/chiark-backup/usr/share/doc/chiark-backup/examples/chiark/settings.sh \
76 $t/chiark-backup/etc/chiark-backup/settings.sh
78 install -d $t/chiark-really/usr/sbin
79 install -d $t/chiark-really/usr/share/man/man8
80 cd $t/chiark-utils-bin/usr/sbin && \
81 mv really $t/chiark-really/usr/sbin/
82 cd $t/chiark-utils-bin/usr/share/man/man8 && \
83 mv really.8 $t/chiark-really/usr/share/man/man8/
84 rm $t/chiark-utils-bin/usr/sbin/trivsoundd \
85 $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
86 rmdir $t/chiark-utils-bin/usr/sbin \
87 $t/chiark-utils-bin/usr/share/man/man8
89 gzip -9f $t/*/usr/share/man/man*/*
91 binary-hook-chiark-backup:
92 binary-hook-chiark-rwbuffer:
93 binary-hook-sync-accounts:
94 binary-hook-chiark-scripts:
95 binary-hook-chiark-really:
96 binary-hook-chiark-utils-bin:
99 set -e; for f in preinst postinst prerm postrm conffiles; do \
100 test -f debian/$p/$$f || continue; \
101 cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
102 chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
104 dpkg-gencontrol -isp -p$p -P$t/$p -Tdebian/sv-$p
105 chown -R root.root debian/tmp
106 chmod -R g-ws debian/tmp
107 debian/rules binary-hook-$p
108 dpkg --build $t/$p ..
110 binary-indep: checkroot build binary-prep
111 set -e; for p in $(packages_indep); do \
112 debian/rules binary-one p=$$p; done
114 binary-arch: checkroot build binary-prep
116 set -ex; for p in chiark-really chiark-utils-bin chiark-rwbuffer; do \
117 dh_strip -p$$p -Pdebian/tmp/$$p; done
118 dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
119 $t/chiark-rwbuffer/usr/bin/*
120 dpkg-shlibdeps -Tdebian/sv-chiark-really \
121 $t/chiark-really/usr/sbin/*
122 set -e; for f in $t/chiark-utils-bin/usr/bin/*; do \
124 */xacpi-simple) d=Suggests ;; \
125 */watershed|*/summer) d=Recommends ;; \
130 dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin $$a
132 -e' next unless m/^shlibs:/; '\
133 -e' s/$$/,/; s/=/=, /; '\
134 -e' s/, libgmp3(?:c2)?,/, libgmp3 | libgmp3c2,/; '\
135 -e' s/=, /=/; s/,$$//; '\
137 set -e; for p in $(packages_arch); \
138 do debian/rules binary-one p=$$p; done
141 test -f cprogs/writebuffer.c
144 # Below here is fairly generic really
146 binary: binary-indep binary-arch
149 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
153 test root = "`whoami`"
155 .PHONY: binary binary-arch binary-indep clean checkroot