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 strip --strip-unneeded --remove-section .note --remove-section .comment $t/chiark-really/usr/sbin/really
80 cd $t/chiark-utils-bin/usr/share/man/man8 && \
81 mv really.8 $t/chiark-really/usr/share/man/man8/
82 rm $t/chiark-utils-bin/usr/sbin/trivsoundd \
83 $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
84 rmdir $t/chiark-utils-bin/usr/sbin \
85 $t/chiark-utils-bin/usr/share/man/man8
87 gzip -9f $t/*/usr/share/man/man*/*
89 binary-hook-chiark-backup:
90 binary-hook-chiark-rwbuffer:
91 binary-hook-sync-accounts:
92 binary-hook-chiark-scripts:
93 binary-hook-chiark-really:
94 binary-hook-chiark-utils-bin:
97 set -e; for f in preinst postinst prerm postrm conffiles; do \
98 test -f debian/$p/$$f || continue; \
99 cp debian/$p/$$f $t/$p/DEBIAN/$$f; \
100 chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \
102 dpkg-gencontrol -isp -p$p -P$t/$p -Tdebian/sv-$p
103 chown -R root.root debian/tmp
104 chmod -R g-ws debian/tmp
105 debian/rules binary-hook-$p
106 dpkg --build $t/$p ..
108 binary-indep: checkroot build binary-prep
109 set -e; for p in $(packages_indep); do \
110 debian/rules binary-one p=$$p; done
112 binary-arch: checkroot build binary-prep
114 dpkg-shlibdeps -Tdebian/sv-chiark-rwbuffer \
115 $t/chiark-rwbuffer/usr/bin/*
116 dpkg-shlibdeps -Tdebian/sv-chiark-really \
117 $t/chiark-really/usr/sbin/*
118 set -e; for f in $t/chiark-utils-bin/usr/bin/*; do \
120 */xacpi-simple) d=Suggests ;; \
121 */watershed|*/summer) d=Recommends ;; \
126 dpkg-shlibdeps -Tdebian/sv-chiark-utils-bin $$a
128 -e' next unless m/^shlibs:/; '\
129 -e' s/$$/,/; s/=/=, /; '\
130 -e' s/, libgmp3(?:c2)?,/, libgmp3 | libgmp3c2,/; '\
131 -e' s/=, /=/; s/,$$//; '\
133 set -e; for p in $(packages_arch); \
134 do debian/rules binary-one p=$$p; done
137 test -f cprogs/writebuffer.c
140 # Below here is fairly generic really
142 binary: binary-indep binary-arch
145 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
149 test root = "`whoami`"
151 .PHONY: binary binary-arch binary-indep clean checkroot