Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 PACKAGE = $(shell dh_listpackages)
4 TMP = $(CURDIR)/debian/$(PACKAGE)
5
6 POD2TEXT = Changes Config Faq Features FeaturesD \
7 Intro IntroEmbperlObject SVN TipsAndTricks
8
9 include /usr/share/dpkg/architecture.mk
10 PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
11 ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')
12
13 export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-bindnow
14
15 %: %.pod
16 pod2text < $< > $@
17
18 %:
19 dh $@ --no-parallel
20
21 override_dh_auto_configure:
22 . /etc/apache2/envvars && yes y | EPHTTPD=/usr/sbin/apache2 dh_auto_configure
23
24 override_dh_auto_install: $(POD2TEXT)
25 # fix occasional upstream permission errors
26 find eg blib/lib -type f -a -perm /111 -exec chmod -x \{\} \;
27
28 dh_auto_install
29
30 # the CGI scripts enable use_redirect_env, so should be safe to
31 # install by default
32 install -m 755 *cgi.pl debian/libembperl-perl/usr/lib/cgi-bin/
33
34 # move German manpages to usr/share/man/de/man{1,2,3}
35 #
36 # find is needed here instead of pure shell wildcards, because
37 # "[a-z]" also matches capital letters iff /bin/sh is a bash
38 # and the locale settings are set to a locale which makes
39 # matches case-insensitive by default, e.g. LC_ALL=de_DE.utf-8.
40 # See https://bugs.debian.org/828636 for details.
41 @set -e;\
42 for f in $$(find $(TMP)/usr/share/man/man3/ -name '*[a-z]D.3pm'); do \
43 f_de=`echo $$f | sed 's,man\(.\)/\([^/]*\)D\.\([^/]*\)$$,de/man\1/\2.\3,'` ;\
44 echo "mv $$f $$f_de" ;\
45 mv $$f $$f_de ;\
46 done
47
48 # ship Apache config in mods-available
49 sed -e 's,@ARCHLIB@,$(ARCHLIB),g' debian/zembperl.load.in > debian/zembperl.load
50 install -m 644 debian/zembperl.conf debian/zembperl.load \
51 $(TMP)/etc/apache2/mods-available/
52
53 # strip .pl off executables (and their manpages)
54 rename -v 's/\.pl//' $(TMP)/usr/bin/emb*
55 rename -v 's/\.pl//' $(TMP)/usr/share/man/man1/emb*
56
57 override_dh_clean:
58 chmod a+x `cat debian/exec-bit`
59 dh_clean