File: rules

package info (click to toggle)
libpdf-table-perl 1%3A1.006-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 532 kB
  • sloc: perl: 3,841; makefile: 17
file content (26 lines) | stat: -rwxr-xr-x 838 bytes parent folder | download
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)
MAN3    = $(TMP)/usr/share/man/man3

%:
	dh $@

override_dh_install:
	dh_install
	sed -i '1s|^#!/usr/bin/env perl|#!/usr/bin/perl|' $(TMP)/usr/share/perl5/PDF/Table.pm

override_dh_installexamples:
	dh_installexamples
	find $(TMP)/usr/share/doc/$(PACKAGE)/examples -type f -print0 | \
		xargs -r0 sed -i -e '1s|^#!/usr/bin/env perl|#!/usr/bin/perl|'

execute_before_dh_installman:
	# Documentation reorganisation seems to have lead to manpages mismatch.
	# PDF::Table.3pm is mostly empty at this point and the manual page has
	# to be forcefully regenerated using Table.pod, per upstream notice.
	chmod 0666 $(MAN3)/PDF::Table.3pm
	pod2man --section 3pm $(CURDIR)/lib/PDF/Table.pod \
	> $(MAN3)/PDF::Table.3pm
	chmod 0444 $(MAN3)/PDF::Table.3pm