4
d=$(shell pwd)/debian/tmp
5
STRIP=strip --strip-unneeded --remove-section=.note --remove-section=.comment
14
$(RM) -r debian/{files,substvars,tmp}
15
find . -name \*~ -print0 | xargs -0 $(RM)
17
binary-indep: checkroot build
19
binary-arch: checkroot build
22
install -d $(d)/DEBIAN
23
install -d $(d)/usr/bin
24
install -d $(d)/usr/share/man/man1
25
install -d $(d)/usr/share/man/man8
26
install -d $(d)/usr/share/doc/$(package)
28
install -c debian/copyright $(d)/usr/share/doc/$(package)/
29
install -c debian/changelog $(d)/usr/share/doc/$(package)/changelog.Debian
30
install -c sup.doc $(d)/usr/share/doc/$(package)/
31
install -c sup.1 $(d)/usr/share/man/man1/
32
install -c supservers.8 $(d)/usr/share/man/man8/supfilesrv.8
33
install -c supservers.8 $(d)/usr/share/man/man8/supscan.8
34
install -c sup supfilesrv supscan $(d)/usr/bin/
35
$(STRIP) $(d)/usr/bin/*
37
gzip -9 $(d)/usr/share/doc/$(package)/sup.doc
38
gzip -9 $(d)/usr/share/doc/$(package)/changelog.Debian
39
find $(d)/usr/share/man -type f -print0 | xargs -0 gzip --best
41
chown -R root.root $(d)
42
find $(d) -type f -print0 | xargs -0 chmod 644
43
find $(d) -type d -print0 | xargs -0 chmod 755
45
chmod a+x $(d)/usr/bin/*
47
dpkg-shlibdeps $(d)/usr/bin/*
48
dpkg-gencontrol -isp -p$(package) -P$(d)
55
binary: binary-indep binary-arch
59
test root = "`whoami`"
61
.PHONY: configure build clean binary binary-indep binary-arch checkdir checkroot