File: rules

package info (click to toggle)
libterm-readkey-perl 2.12-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 144 kB
  • ctags: 52
  • sloc: perl: 1,088; makefile: 45
file content (57 lines) | stat: -rwxr-xr-x 1,447 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
#!/usr/bin/make -f

tempdir=$(shell pwd)/debian/tmp/libterm-readkey-perl

insdirs=$(tempdir)/DEBIAN \
	$(tempdir)/usr/doc/libterm-readkey-perl \
	$(tempdir)/usr/sbin

build: debian/rules
	perl Makefile.PL INSTALLDIRS=perl
	$(MAKE) all LDLOADLIBS=-lc
	sed -n -e '/\*\*\*\*\*/,/\*\*\*\*\*/p' ReadKey.xs > Changelog.gen
	touch build

binary: binary-indep binary-arch

binary-arch: checkroot build $(insdirs)
	$(MAKE) PREFIX=$(tempdir)/usr INSTALLMAN3DIR=$(tempdir)/usr/man/man3 pure_install
	install -m 644 debian/copyright $(tempdir)/usr/doc/libterm-readkey-perl/copyright
	install -m 644 Changelog.gen $(tempdir)/usr/doc/libterm-readkey-perl/changelog
	dpkg-shlibdeps ` find $(tempdir) -type f | xargs file | grep ELF | cut -d: -f1 ` 
	dpkg-gencontrol -P$(tempdir)
	dh_strip -v -P$(tempdir)
	dh_compress -v -P$(tempdir)
	chown -Rc root.root $(tempdir)
	chmod -Rc go=rX,u+wX $(tempdir)
	dh_md5sums -v -P$(tempdir)
	dpkg --build $(tempdir) ..

binary-indep: checkroot build $(insdirs)

clean: zapdir
	if [ -e Makefile ]; then \
		$(MAKE) distclean; \
	fi
	for f in build debian/files Net/Config.pm; do \
		if [ -e $$f ]; then \
			rm -f $$f; \
		fi; \
	done
	find -name "*~" | xargs -r rm -f
	rm -f Changelog.gen

checkroot: debian/rules
	test root = "`whoami`"

zapdir: debian/rules
	rm -rfv debian/tmp
	if [ -e $(tempdir) ]; then \
		rm -rf $(tempdir); \
	fi;

$(insdirs): zapdir
	install -d -m 755 $@
	chmod g-s $@

.PHONY: binary clean checkroot