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
|
#!/usr/bin/make -f
PACKAGE=$(shell dh_listpackages)
TMP =$(CURDIR)/debian/$(PACKAGE)
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
%:
dh $@
override_dh_auto_test:
xvfb-run -a dh_auto_test
override_dh_auto_install:
dh_auto_install
mkdir -p $(TMP)/usr/share/perl5
mv $(TMP)$(ARCHLIB)/Tk $(TMP)/usr/share/perl5/Tk
# remove /usr/share/perl5/Tk/demos, we install them to examples/
[ ! -d $(TMP)/usr/share/perl5/Tk/demos ] || rm -rvf $(TMP)/usr/share/perl5/Tk/demos
[ ! -d $(TMP)$(ARCHLIB) ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)$(ARCHLIB)
override_dh_installexamples:
# make sure all demo programs are not executable
chmod 0644 $(CURDIR)/examples/*
dh_installexamples
sed -i '1s|^#!/usr/local/binperl|#!/usr/bin/perl|' $(TMP)/usr/share/doc/$(PACKAGE)/examples/*
|