1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/usr/bin/make -f
package=shc
tempdir=$(shell pwd)/debian/tmp
insdirs=$(tempdir)/$(package)/DEBIAN \
$(tempdir)/$(package)/usr/bin \
$(tempdir)/$(package)/usr/share/doc/$(package) \
$(tempdir)/$(package)/usr/share/man/man1 \
binary: binary-indep binary-arch
binary-arch: debian/control checkroot build $(insdirs)
install -m 644 debian/shc.1 $(tempdir)/$(package)/usr/share/man/man1
install -s -m 755 shc $(tempdir)/$(package)/usr/bin
install -m 644 debian/changelog $(tempdir)/$(package)/usr/share/doc/$(package)/changelog.Debian
find $(tempdir)/$(package)/usr/share/doc -type f | xargs -r gzip -v9
install -m 644 debian/copyright $(tempdir)/$(package)/usr/share/doc/$(package)
install -m 644 shc.html $(tempdir)/$(package)/usr/share/doc/$(package)/shc.html
install -m 644 debian/README.Debian $(tempdir)/$(package)/usr/share/doc/$(package)/README.Debian
find $(tempdir)/$(package)/usr/share/man -type f | xargs -r gzip -v9
dh_fixperms
dh_perl
dh_installdeb -P$(tempdir)/$(package)
dpkg-shlibdeps -p$(package) shc
dpkg-gencontrol -isp -P$(tempdir)/$(package) -p$(package)
dpkg --build $(tempdir)/$(package) ..
binary-indep: debian/control checkroot build $(insdirs)
build: debian/control
make
touch build
checkroot: debian/control
test "root" = "$(shell whoami)"
clean: debian/control
make clean
make cleanall
for i in build debian/files debian/substvars `find -name "*~"`; do \
if [ -e $$i ]; then \
rm -f $$i; \
fi; \
done
for i in $(tempdir); do \
if [ -d $$i ]; then \
rm -rf $$i; \
fi; \
done
dh_clean
$(insdirs):
if [ -d $@ ]; then \
rm -rf $@; \
fi
install -d -m 755 $@
chmod g-s $@
.PHONY: binary binary-arch binary-indep checkroot clean
#Local variables:
#mode: makefile
#End:
|