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
|
#!/usr/bin/make -f
tempdir=$(shell pwd)/debian/tmp/data-dumper
insdirs=$(tempdir)/DEBIAN \
$(tempdir)/usr/doc/data-dumper
build: debian/rules
perl Makefile.PL INSTALLDIRS=perl
$(MAKE) all
touch build
binary: binary-indep binary-arch
binary-indep: checkroot build $(insdirs)
$(MAKE) PREFIX=$(tempdir)/usr INSTALLMAN3DIR=$(tempdir)/usr/man/man3 pure_install
# Remove bogus architecture dependence
rm -rf $(tempdir)/usr/lib/perl5/alpha-linux
install -m 644 debian/copyright $(tempdir)/usr/doc/data-dumper/copyright
dpkg-gencontrol -P$(tempdir)
chown -R root.root $(tempdir)
chmod -R g-ws $(tempdir)
dpkg --build $(tempdir) ..
binary-arch: checkroot build $(insdirs)
clean: zapdir
if [ -e Makefile ]; then \
$(MAKE) distclean; \
fi
for f in build debian/files; do \
if [ -e $$f ]; then \
rm -f $$f; \
fi; \
done
find -name "*~" | xargs -r rm -f
checkroot: debian/rules
test root = "`whoami`"
zapdir: debian/rules
if [ -e $(tempdir) ]; then \
rm -rf $(tempdir); \
fi;
$(insdirs): zapdir
install -d -m 755 $@
chmod g-s $@
.PHONY: binary binary-arch binary-indep clean checkroot zapdir
|