| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
PACKAGE=im |
| 4 |
|
| 5 |
IM_RELEASE_VERSION=`head -1 00changes | cut -d ' ' -f 1` |
| 6 |
IM_RELEASE_DATE=`head -1 00changes | cut -d ' ' -f 2 | sed 's/[()]//g; s:/:-:g'` |
| 7 |
|
| 8 |
build: build-arch build-indep |
| 9 |
|
| 10 |
build-arch: |
| 11 |
|
| 12 |
build-indep: build-indep-stamp |
| 13 |
build-indep-stamp: |
| 14 |
dh_testdir |
| 15 |
dh_update_autotools_config |
| 16 |
./configure --prefix=/usr --sysconfdir=/etc \ |
| 17 |
--with-perldir=/usr/share/perl5 --with-ssh=/usr/bin/ssh \ |
| 18 |
--with-hostname=invalid.example.jp --with-fsyncno=0 \ |
| 19 |
--disable-rpop --disable-usecl |
| 20 |
touch $@ |
| 21 |
|
| 22 |
clean: |
| 23 |
dh_testdir |
| 24 |
dh_testroot |
| 25 |
rm -f *-stamp pod2htm* |
| 26 |
if [ -f Makefile ]; then make distclean; fi |
| 27 |
debconf-updatepo |
| 28 |
dh_clean |
| 29 |
|
| 30 |
install: install-arch install-indep |
| 31 |
|
| 32 |
install-arch: |
| 33 |
|
| 34 |
install-indep: install-indep-stamp |
| 35 |
install-indep-stamp: |
| 36 |
dh_testdir |
| 37 |
dh_testroot |
| 38 |
dh_prep |
| 39 |
dh_installdirs |
| 40 |
|
| 41 |
make DESTDIR=$(CURDIR)/debian/$(PACKAGE) install |
| 42 |
|
| 43 |
cp man/00readme debian/$(PACKAGE)/usr/share/doc/im/manual/ |
| 44 |
cp man/imput debian/$(PACKAGE)/usr/share/doc/im/manual/en/ |
| 45 |
cp man/*.jis debian/$(PACKAGE)/usr/share/doc/im/manual/ja/ |
| 46 |
|
| 47 |
for i in Address Alias Config EncDec File \ |
| 48 |
Folder GetPass Grep History Http \ |
| 49 |
Imap Iso2022jp Japanese LocalMbox Log \ |
| 50 |
MD5 Message MsgStore Nntp Pop \ |
| 51 |
Recipient Scan Smtp Ssh Stdio \ |
| 52 |
TcpTransaction Util; do \ |
| 53 |
pod2html IM/$$i.pm \ |
| 54 |
> debian/$(PACKAGE)/usr/share/doc/im/html/IM::$$i.html; \ |
| 55 |
pod2man --section=3pm --release=IM$(IM_RELEASE_VERSION) \ |
| 56 |
--date=$(IM_RELEASE_DATE) \ |
| 57 |
--center="Internet Message Perl modules" \ |
| 58 |
IM/$$i.pm > debian/$(PACKAGE)/usr/share/man/man3/IM::$$i.3pm; \ |
| 59 |
done |
| 60 |
|
| 61 |
for i in imali imcat imcd imclean imget \ |
| 62 |
imgrep imhist imhsync imjoin imls \ |
| 63 |
immknmz immv impack impath imput \ |
| 64 |
impwagent imrm imsetup imsort imstore \ |
| 65 |
imtar; do \ |
| 66 |
pod2man --section=1p --release=IM$(IM_RELEASE_VERSION) \ |
| 67 |
--date=$(IM_RELEASE_DATE) \ |
| 68 |
--center="Internet Message commands" \ |
| 69 |
$$i > debian/$(PACKAGE)/usr/share/man/man1/$$i.1p; \ |
| 70 |
done |
| 71 |
|
| 72 |
rm -f debian/$(PACKAGE)/etc/im/SiteConfig |
| 73 |
touch $@ |
| 74 |
|
| 75 |
binary-indep: build-indep install-indep |
| 76 |
dh_testdir |
| 77 |
dh_testroot |
| 78 |
dh_installdocs |
| 79 |
dh_installexamples |
| 80 |
# dh_installmanpages |
| 81 |
dh_installchangelogs 00changes |
| 82 |
dh_strip |
| 83 |
dh_compress |
| 84 |
# dh_suidregister |
| 85 |
dh_fixperms |
| 86 |
dh_installdebconf |
| 87 |
dh_installdeb |
| 88 |
dh_perl |
| 89 |
dh_gencontrol |
| 90 |
dh_md5sums |
| 91 |
dh_builddeb |
| 92 |
|
| 93 |
binary-arch: build-arch install-arch |
| 94 |
|
| 95 |
binary: binary-arch binary-indep |
| 96 |
.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install-indep install-arch install |