File: rules

package info (click to toggle)
dbishell 0.8.9-7.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 788 kB
  • ctags: 1,423
  • sloc: perl: 13,353; makefile: 138; sh: 10
file content (77 lines) | stat: -rwxr-xr-x 1,656 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f
# -*- Makefile -*-

#export DH_VERBOSE=1

export DH_COMPAT=3

PFILES := $(shell ls -1 debian/patches/[0-9][0-9][0-9]-*.patch)
PDONE  := $(foreach P,$(PFILES),$P.pdone)
PUNDO  := $(foreach P,$(PFILES),$P.pundo)

build: build-stamp
build-stamp: patch
	dh_testdir
	$(MAKE)
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp
	$(MAKE) clean
	dh_clean

patch:   $(PDONE)

unpatch: $(PUNDO)

%.pdone: %
	patch -p0 < $< && touch $@

%.pundo: %
	if [ -f "$<.pdone" ]; then patch -R -p0 < $< && rm -f "$<.pdone"; fi

install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	echo -e "\n\n\n\n\n" | perl ./installer.pl /usr/bin/perl /usr /usr/share/perl5 `pwd`/debian/dbishell
	chmod -x debian/dbishell/usr/share/perl5/DBIShell.pm
	rm -f debian/dbishell/usr/share/doc/dbishell/LICENSE
	mkdir -p debian/dbishell/usr/share/man/man1
	pod2man \
	  "--center=Debian GNU/Linux" \
	  "--date=`date '+%B %d %Y'`" \
	  --section=1                 \
	  "--release=Version "`dpkg-parsechangelog | grep ^Version: | \
	  cut -f2 '-d '` dbishell     \
		debian/dbishell/usr/share/man/man1/dbishell.1
	rm -f debian/dbishell/usr/bin/dbigtk
	rm -fR debian/dbishell/usr/share/dbishell
	rm -fR debian/dbishell/usr/share/perl5/Gtk

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installmanpages
	dh_installmenu
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_link
	dh_perl
	dh_installdebconf
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install
# Nothing

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install patch unpatch