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 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#!/usr/bin/make -f
#
# Copyright (C) 1998 Roberto Lumbreras <rover@debian.org>
# Copying: GPL
SHELL = /bin/bash
PACKAGE = $(shell perl -e 'print <> =~ /^(.*) \(.*\)/' debian/changelog)
PKG_VER = $(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog)
PKG_UPVER= $(shell perl -e 'print <> =~ /\((.*)-[^-]*\)/' debian/changelog)
BINS = ezmlm-issubn ezmlm-make ezmlm-manage ezmlm-send \
ezmlm-request ezmlm-reject ezmlm-return ezmlm-warn ezmlm-weed \
ezmlm-list ezmlm-clean ezmlm-cron ezmlm-store ezmlm-moderate \
ezmlm-sub ezmlm-unsub ezmlm-idx ezmlm-gate ezmlm-tstdig \
ezmlm-get
SHBINS = ezmlm-both ezmlm-check ezmlm-accept
MAN1 = ezmlm-both.1 ezmlm-issubn.1 ezmlm-list.1 \
ezmlm-make.1 ezmlm-manage.1 ezmlm-moderate.1 ezmlm-reject.1 \
ezmlm-request.1 ezmlm-return.1 ezmlm-send.1 ezmlm-store.1 \
ezmlm-sub.1 ezmlm-unsub.1 ezmlm-warn.1 ezmlm-weed.1 \
ezmlm-idx.1 ezmlm-gate.1 ezmlm-tstdig.1 ezmlm-get.1 \
ezmlm-check.1 ezmlm-clean.1 ezmlm-cron.1 ezmlm-accept.1
MAN5 = ezmlm.5
DOCS = BLURB DOWNGRADE.idx FAQ.idx INSTALL INSTALL.idx README \
README.idx THANKS TODO UPGRADE.idx debian/QUICKSTART
build: stamp-build
stamp-build:
$(MAKE)
touch stamp-build
binary: binary-indep binary-arch binary-src
binary-indep:
binary-arch: checkroot build
$(RM) -r debian/tmp
install -d -m0755 debian/tmp/{DEBIAN,etc,usr/{bin,man/man{1,5},doc/$(PACKAGE)-idx/examples}}
install -s -m0755 $(BINS) debian/tmp/usr/bin/
install -m0755 $(SHBINS) debian/tmp/usr/bin/
install -m0644 $(MAN1) debian/tmp/usr/man/man1/
install -m0644 $(MAN5) debian/tmp/usr/man/man5/
install -m0644 $(DOCS) debian/tmp/usr/doc/ezmlm-idx/
install -m0644 ezmlmrc debian/tmp/etc/ezmlmrc
install -m0644 ezmlmrc.fr ezmlmrc.jp ezmlmrc.se debian/tmp/usr/doc/ezmlm-idx/examples/
install -m0644 CHANGES debian/tmp/usr/doc/ezmlm-idx/changelog
install -m0644 CHANGES.idx debian/tmp/usr/doc/ezmlm-idx/changelog.idx
install -m0644 debian/changelog debian/tmp/usr/doc/ezmlm-idx/changelog.Debian
gzip -9fr debian/tmp/usr/doc/ debian/tmp/usr/man/
install -m0644 debian/copyright debian/tmp/usr/doc/ezmlm-idx/
install -m0755 debian/run.postinst debian/tmp/DEBIAN/postinst
dpkg-shlibdeps $(BINS)
dpkg-gencontrol -pezmlm-idx -cdebian/control.real
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
binary-src: checkroot debian/control ../$(PACKAGE)_$(PKG_UPVER).orig.tar.gz ../$(PACKAGE)_$(PKG_VER).dsc ../$(PACKAGE)_$(PKG_VER).diff.gz
$(RM) -r debian/tmp-src debian/files
install -d -m0755 debian/tmp-src/{DEBIAN,usr/{bin,{src,doc}/$(PACKAGE)-src}}
install -m0755 debian/build-PACKAGE debian/tmp-src/usr/bin/build-$(PACKAGE)
install -m0644 ../$(PACKAGE)_$(PKG_UPVER).orig.tar.gz \
../$(PACKAGE)_$(PKG_VER).dsc \
../$(PACKAGE)_$(PKG_VER).diff.gz \
debian/tmp-src/usr/src/$(PACKAGE)-src/
sed -e "s/#PACKAGE#/$(PACKAGE)/" debian/src.postinst > debian/tmp-src/DEBIAN/postinst
chmod 0755 debian/tmp-src/DEBIAN/postinst
sed -e "s/#PACKAGE#/$(PACKAGE)/" debian/README-src > debian/tmp-src/usr/doc/$(PACKAGE)-src/README.Debian
chmod 0644 debian/tmp-src/usr/doc/$(PACKAGE)-src/README.Debian
install -m0644 debian/changelog debian/tmp-src/usr/doc/$(PACKAGE)-src/changelog.Debian
install -m0644 debian/README-src debian/tmp-src/usr/doc/$(PACKAGE)-src/README.Debian
gzip -9fr debian/tmp-src/usr/doc/
install -m0644 debian/copyright debian/tmp-src/usr/doc/$(PACKAGE)-src/
dpkg-gencontrol -p$(PACKAGE)-src -Pdebian/tmp-src
chown -R root.root debian/tmp-src
chmod -R go=rX debian/tmp-src
dpkg --build debian/tmp-src ..
debian/control: debian/control.real
test -f debian/control.real && sed -e "/^Package: $(PACKAGE)-src$$/b" -e "/^Package: /,/^$$/d" debian/control.real > debian/control
../$(PACKAGE)_$(PKG_UPVER).orig.tar.gz:
@{ echo "Error: $@ missing"; exit 1; }
../$(PACKAGE)_$(PKG_VER).dsc ../$(PACKAGE)_$(PKG_VER).diff.gz: debian/rules
debian/rules clean
cd ..; dpkg-source -b $(PACKAGE)-$(PKG_UPVER)
checkdir:
@test -f debian/rules
checkroot: checkdir
@test 0 = `id -u` || { echo "Error: not super-user"; exit 1; }
clean: checkdir debian/control
$(RM) stamp-build debian/files debian/substvars
$(MAKE) clean
$(RM) *~ core
$(RM) -r debian/tmp debian/tmp-src
.PHONY: build binary binary-indep binary-arch binary-src checkdir checkroot clean
|