File: rules

package info (click to toggle)
libembperl-perl 2.5.0-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 7,528 kB
  • sloc: ansic: 21,387; perl: 14,496; cpp: 467; xml: 49; makefile: 33; sh: 24
file content (57 lines) | stat: -rwxr-xr-x 1,811 bytes parent folder | download | duplicates (2)
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
#!/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}')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-bindnow

%: %.pod
	pod2text < $< > $@

%:
	dh $@ --no-parallel

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}
	#
	# find is needed here instead of pure shell wildcards, because
	# "[a-z]" also matches capital letters iff /bin/sh is a bash
	# and the locale settings are set to a locale which makes
	# matches case-insensitive by default, e.g. LC_ALL=de_DE.utf-8.
	# See https://bugs.debian.org/828636 for details.
	@set -e;\
	for f in $$(find $(TMP)/usr/share/man/man3/ -name '*[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