File: rules

package info (click to toggle)
libterm-readline-perl-perl 0.9906-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 116 kB
  • ctags: 50
  • sloc: perl: 1,687; makefile: 41
file content (59 lines) | stat: -rwxr-xr-x 1,555 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
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
58
59
#!/usr/bin/make -f
## debian/rules to build the debian version of Term::ReadLine::Perl
## $Id:$
##

PWD  := $(shell pwd)

ifndef PERL
PERL = /usr/bin/perl
endif

USRDIR   = $(PWD)/debian/tmp/usr/lib/perl5
MAN3DIR  = $(PWD)/debian/tmp/usr/man/man3
DOCDIR   = $(PWD)/debian/tmp/usr/doc/libterm-readline-perl-perl

Makefile: Makefile.PL
	$(PERL) Makefile.PL INSTALLDIRS=perl INSTALLPRIVLIB=$(USRDIR) INSTALLMAN3DIR=$(MAN3DIR)

build: Makefile
	$(MAKE) all
	touch build

binary-indep: build
	-[ -d debian/tmp ] && rm -rf debian/tmp 2>/dev/null

	install -d $(USRDIR)

	$(MAKE) pure_install
	-gzip -9rf $(MAN3DIR)
	find debian/tmp -type f -name .packlist -print0 | xargs --null --no-run-if-empty rm -f
	-find debian/tmp -type d -empty -print0 | xargs --null --no-run-if-empty rmdir -p --ignore-fail-on-non-empty
	find debian/tmp \( -name '*.pm' -o '*.pl' \) -print0 | xargs --null --no-run-if-empty \
	  perl -i -pe '$$_ = "#!/usr/bin/perl$$1\n" if m|^#!.*/perl(.*)$$|;'

	install -d $(DOCDIR)
	cp CHANGES $(DOCDIR)/changelog
	cp debian/changelog $(DOCDIR)/changelog.Debian
	-gzip -9rf $(DOCDIR)
	cp debian/copyright $(DOCDIR)/copyright

	install -d debian/tmp/DEBIAN
	echo "perl:Depends=perl5" > debian/substvars
	dpkg-gencontrol
	-dh_md5sums
	chown -R root:root debian/tmp
	chmod -R go=rX,u+wX debian/tmp
	dpkg --build debian/tmp ..

binary-arch: build
	true

binary: binary-indep binary-arch

clean: 
	-$(MAKE) realclean
	-rm -rf debian/tmp
	-rm -f build debian/files debian/substvars *~ debian/*~ *.old *.bak

.PHONY: binary binary-arch binary-indep clean