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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
#!/usr/bin/make -f
# Exim rules file, based on example rules by:
# Copyright 1994,1995 by Ian Jackson.
# Modifications for exim by Tim Cutts <tjrc1@scalopus.bio.cam.ac.uk>
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
# Modified to not use debmake (I hate it) by Mark Baker <mbaker@iee.org>
package=exim
build:
$(checkdir)
$(MAKE)
touch build
clean:
$(checkdir)
-rm -f build
-( test -d build-`scripts/os-type`-`scripts/arch-type` && $(MAKE) clean)
-rm -rf build-`scripts/os-type`-`scripts/arch-type`
-rm `find . -name "*~"`
-rm -rf debian/*substvars debian/tmp debian/files*
-rm -rf eximon*
binary-indep: checkroot build
$(checkdir)
# No architecture independent packages
binary-arch: checkroot build
$(checkdir)
# Build exim package
-rm -rf debian/tmp
# First create directories
install -d debian/tmp/DEBIAN
install -d debian/tmp/usr/sbin
install -d debian/tmp/usr/bin
install -d debian/tmp/usr/lib
install -d debian/tmp/usr/doc/exim
install -d debian/tmp/usr/man/man8
install -d debian/tmp/etc/init.d
install -d debian/tmp/etc/cron.daily
install -d debian/tmp/etc/cron.d
install -d debian/tmp/etc/ppp/ip-up.d
# Make install does most stuff for us
$(MAKE) inst_conf=`pwd`/debian/tmp/usr/doc/exim/example.conf \
inst_dest=`pwd`/debian/tmp/usr/sbin install
# But eximon wants to go in a different package
mv debian/tmp/usr/sbin/eximon* .
# Install other files
install debian/config debian/tmp/usr/sbin/eximconfig
(cd debian/tmp/usr/sbin; ln -sf exim rsmtp; \
ln -sf exim sendmail; \
ln -sf exim runq; \
ln -sf exim rmail; \
cd ../bin; ln -sf ../sbin/exim mailq; \
cd ../lib; ln -sf ../sbin/exim sendmail )
install debian/newaliases debian/tmp/usr/bin
install -m 0755 debian/init.d debian/tmp/etc/init.d/exim
install -m 0755 debian/cron.daily debian/tmp/etc/cron.daily/exim
install -m 0644 debian/crontab debian/tmp/etc/cron.d/exim
install -m 0755 debian/ip-up.d debian/tmp/etc/ppp/ip-up.d/exim
# Install documentation
cp debian/{exicyclog,exigrep,exim,exim_db,exim_dbmbuild,exim_dumpdb,exim_fixdb,exim_tidydb,eximstats,exinext,exiwhat,exiqsumm,eximconfig,newaliases,rmail,rsmtp,runq,sendmail,mailq}.8 debian/tmp/usr/man/man8
gzip -9v debian/tmp/usr/man/man8/*
cp doc/NewStuff debian/tmp/usr/doc/exim
cp debian/exim-uucp.texinfo debian/tmp/usr/doc/exim
cp README* doc/*.txt debian/README.debian debian/mails \
debian/tmp/usr/doc/exim
cp debian/changelog debian/tmp/usr/doc/exim/changelog.Debian
cp doc/ChangeLog debian/tmp/usr/doc/exim/changelog
gzip -9v debian/tmp/usr/doc/exim/*
cp debian/copyright debian/tmp/usr/doc/exim
# Generate md5sums
(cd debian/tmp; find -type f | sed s#^./## | grep -v DEBIAN | \
xargs md5sum > DEBIAN/md5sums )
# Standard package building stuff
install -m 0755 debian/preinst debian/postinst debian/tmp/DEBIAN
install -m 0755 debian/prerm debian/postrm debian/tmp/DEBIAN
cp debian/conffiles debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/sbin/exim
dpkg-gencontrol -pexim
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
dpkg --build debian/tmp ..
# Build eximon package
-rm -rf debian/tmp
# First create directories
install -d debian/tmp/DEBIAN
install -d debian/tmp/usr/sbin
install -d debian/tmp/usr/lib/exim
install -d debian/tmp/usr/man/man8
install -d debian/tmp/usr/doc
# Symlink to documentation in /usr/doc/exim
ln -s exim debian/tmp/usr/doc/eximon
# Move eximon back
mv eximon debian/tmp/usr/sbin
mv eximon.bin debian/tmp/usr/lib/exim
# Install man page
cp debian/eximon.8 debian/tmp/usr/man/man8
gzip -9v debian/tmp/usr/man/man8/*
# Generate md5sums
(cd debian/tmp; find -type f | sed s#^./## | grep -v DEBIAN | \
xargs md5sum > DEBIAN/md5sums )
# Standard package building stuff
dpkg-shlibdeps debian/tmp/usr/lib/exim/eximon.bin
dpkg-gencontrol -peximon
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f src/exim.c -a -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|