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
|
#!/usr/bin/make -f
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)
POD2TEXT = Changes Config Faq Features FeaturesD \
Intro IntroEmbperlObject SVN TipsAndTricks
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
%: %.pod
pod2text < $< > $@
%:
dh $@
override_dh_auto_configure:
. /etc/apache2/envvars && yes y | EPHTTPD=/usr/sbin/apache2 dh_auto_configure
override_dh_auto_install: $(POD2TEXT)
# fix occasional upstream permission errors
find eg blib/lib -type f -a -perm +111 -exec chmod -x \{\} \;
dh_auto_install
# the CGI scripts enable use_redirect_env, so should be safe to
# install by default
install -m 755 *cgi.pl debian/libembperl-perl/usr/lib/cgi-bin/
# move German manpages to usr/share/man/de/man{1,2,3}
@set -e;\
for f in $(TMP)/usr/share/man/man3/*[a-z]D.3pm; do \
f_de=`echo $$f | sed 's,man\(.\)/\([^/]*\)D\.\([^/]*\)$$,de/man\1/\2.\3,'` ;\
echo "mv $$f $$f_de" ;\
mv $$f $$f_de ;\
done
# ship Apache config in mods-available
sed -e 's,@ARCHLIB@,$(ARCHLIB),g' debian/zembperl.load.in > debian/zembperl.load
install -m 644 debian/zembperl.conf debian/zembperl.load \
$(TMP)/etc/apache2/mods-available/
# strip .pl off executables (and their manpages)
rename -v 's/\.pl//' $(TMP)/usr/bin/emb*
rename -v 's/\.pl//' $(TMP)/usr/share/man/man1/emb*
override_dh_clean:
chmod a+x `cat debian/exec-bit`
dh_clean
|