File: rules

package info (click to toggle)
im 1%3A149-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,292 kB
  • ctags: 343
  • sloc: perl: 8,078; sh: 1,791; makefile: 142
file content (96 lines) | stat: -rwxr-xr-x 2,558 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f

PACKAGE=im

IM_RELEASE_VERSION=`head -1 00changes | cut -d ' ' -f 1`
IM_RELEASE_DATE=`head -1 00changes | cut -d ' ' -f 2 | sed 's/[()]//g; s:/:-:g'`

build: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr --libdir=/etc \
	  --with-perldir=/usr/share/perl5 --with-ssh=/usr/bin/ssh \
	  --with-hostname=invalid.example.jp --with-fsyncno=0 \
	  --disable-rpop --disable-usecl
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp
	rm -f pod2htm*
	if [ -f Makefile ]; then make distclean; fi
	debconf-updatepo
	dh_clean

install: install-stamp
install-stamp: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	make install prefix=$(CURDIR)/debian/$(PACKAGE)/usr \
	  libdir=$(CURDIR)/debian/$(PACKAGE)/etc \
	  perldir=$(CURDIR)/debian/$(PACKAGE)/usr/share/perl5

	cp man/00readme debian/$(PACKAGE)/usr/share/doc/im/manual/
	cp man/imput debian/$(PACKAGE)/usr/share/doc/im/manual/en/
	cp man/*.jis debian/$(PACKAGE)/usr/share/doc/im/manual/ja/

	for i in Address Alias Config EncDec File \
	  Folder GetPass Grep History Http \
	  Imap Iso2022jp Japanese LocalMbox Log \
	  MD5 Message MsgStore Nntp Pop \
	  Recipient Scan Smtp Ssh Stdio \
	  TcpTransaction Util; do \
	 pod2html IM/$$i.pm \
	   > debian/$(PACKAGE)/usr/share/doc/im/html/IM::$$i.html; \
	 pod2man --section=3pm --release=IM$(IM_RELEASE_VERSION) \
	   --date=$(IM_RELEASE_DATE) \
	   --center="Internet Message Perl modules" \
	   IM/$$i.pm > debian/$(PACKAGE)/usr/share/man/man3/IM::$$i.3pm; \
	done

	for i in imali imcat imcd imclean imget \
	  imgrep imhist imhsync imjoin imls \
	  immknmz immv impack impath imput \
	  impwagent imrm imsetup imsort imstore \
	  imtar; do \
	 pod2man --section=1p --release=IM$(IM_RELEASE_VERSION) \
	   --date=$(IM_RELEASE_DATE) \
	   --center="Internet Message commands" \
	   $$i > debian/$(PACKAGE)/usr/share/man/man1/$$i.1p; \
	done

	rm -f debian/$(PACKAGE)/etc/im/SiteConfig

	touch install-stamp

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
#	dh_installmanpages
	dh_installchangelogs 00changes
	dh_strip
	dh_compress
#	dh_suidregister
	dh_fixperms
	dh_installdebconf
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

binary-arch: build install

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary