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
23 build: build_arch build_indep
28 set -e; for s in $(subdirs_build); do \
29 $(MAKE) -C $$s -i distclean || \
30 $(MAKE) -C $$s -f Makefile.in distclean; \
32 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
38 set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \
39 $(MAKE) -C $$s install install-docs install-examples \
42 varlib=$t/$$s/var/lib \
43 mandir=$t/$$s/usr/share/man; \
46 mv $t/cprogs $t/chiark-utils-bin
48 cp -a debian/tmp/sync-accounts/* debian/tmp/scripts/.
49 rm -r debian/tmp/sync-accounts
50 mv debian/tmp/scripts debian/tmp/chiark-scripts
51 mv debian/tmp/backup debian/tmp/chiark-backup
53 set -e; for p in $(packages); do \
54 install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \
55 cp debian/copyright debian/changelog \
56 $t/$$p/usr/share/doc/$$p/; \
58 $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \
59 gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \
62 install -d $t/chiark-rwbuffer/usr/bin
63 install -d $t/chiark-rwbuffer/usr/share/man/man1
64 cd $t/chiark-utils-bin/usr/bin && \
65 mv readbuffer writebuffer $t/chiark-rwbuffer/usr/bin/
66 cd $t/chiark-utils-bin/usr/share/man/man1 && \
67 mv readbuffer.1 writebuffer.1 $t/chiark-rwbuffer/usr/share/man/man1/
69 install -d $t/chiark-backup/usr/share/man/man1
70 cp backup/man/*.1 $t/chiark-backup/usr/share/man/man1/
71 cd $t/chiark-backup/usr/share/man/man1 && \
73 mv "$$m" backup-"$$m"; \
76 $t/chiark-backup/usr/share/doc/chiark-backup/examples/chiark/settings.sh \
77 $t/chiark-backup/etc/chiark-backup/settings.sh
79 install -d $t/chiark-really/usr/sbin
80 install -d $t/chiark-really/usr/share/man/man8
81 cd $t/chiark-utils-bin/usr/sbin && \
82 mv really $t/chiark-really/usr/sbin/
83 cd $t/chiark-utils-bin/usr/share/man/man8 && \
84 mv really.8 $t/chiark-really/usr/share/man/man8/
85 rm $t/chiark-utils-bin/usr/sbin/trivsoundd \
86 $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
87 rmdir $t/chiark-utils-bin/usr/sbin \
88 $t/chiark-utils-bin/usr/share/man/man8
90 gzip -9f $t/*/usr/share/man/man*/*
92 binary-hook-chiark-backup:
93 binary-hook-chiark-rwbuffer:
94 binary-hook-sync-accounts:
95 binary-hook-chiark-scripts:
96 binary-hook-chiark-really:
97 binary-hook-chiark-utils-bin:
100 set -e; for f in preinst postinst prerm postrm conffiles; do \
101 test -f debian/$p/$$f || continue; \
102 cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
103 chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
105 dpkg-gencontrol -isp -p$p -P$t/$p -Tdebian/sv-$p
106 chown -R root.root debian/tmp
107 chmod -R g-ws debian/tmp
108 debian/rules binary-hook-$p
109 dpkg --build $t/$p ..
111 binary-indep: checkroot build binary-prep
112 set -e; for p in $(packages_indep); do \
113 debian/rules binary-one p=$$p; done
115 binary-arch: checkroot build binary-prep
117 set -ex; for p in chiark-really chiark-utils-bin chiark-rwbuffer; do \
118 dh_strip -p$$p -Pdebian/tmp/$$p; done
119 dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
120 $t/chiark-rwbuffer/usr/bin/*
121 dpkg-shlibdeps -Tdebian/sv-chiark-really \
122 $t/chiark-really/usr/sbin/*
123 set -e; for f in $t/chiark-utils-bin/usr/bin/*; do \
125 */xacpi-simple) d=Suggests ;; \
126 */watershed|*/summer) d=Recommends ;; \
131 dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin $$a
133 -e' next unless m/^shlibs:/; '\
134 -e' s/$$/,/; s/=/=, /; '\
135 -e' s/, libgmp3(?:c2)?,/, libgmp3 | libgmp3c2,/; '\
136 -e' s/=, /=/; s/,$$//; '\
138 set -e; for p in $(packages_arch); \
139 do debian/rules binary-one p=$$p; done
142 test -f cprogs/writebuffer.c
145 # Below here is fairly generic really
147 binary: binary-indep binary-arch
150 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
154 test root = "`whoami`"
156 .PHONY: binary binary-arch binary-indep clean checkroot