File: rules

package info (click to toggle)
libimage-imlib2-perl 2.03-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 324 kB
  • sloc: perl: 305; ansic: 112; makefile: 10
file content (17 lines) | stat: -rwxr-xr-x 542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_installexamples:
	dh_installexamples
	# Fix paths in the examples
	perl -pi -e 's#/usr/local/bin/perl#/usr/bin/perl#g' $(TMP)/usr/share/doc/$(PACKAGE)/examples/*.pl
	# Remove pointless (for debian) use lib '../ ...' stuff [hint: \x27 is ']
	perl -pi -e 's#\s*use\s+lib\s+(?:qw\(\s*\.\./[^\)]+\)|\s*\.\./[^\x27]+\x27);\s*\n##' \
		$(TMP)/usr/share/doc/$(PACKAGE)/examples/*.pl