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
|
#!/usr/bin/make -f
# This file is part of SAUCE, a very picky anti-spam receiver-SMTP.
# SAUCE is Copyright (C) 1997-2003 Ian Jackson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: rules,v 1.23.4.3 2008/03/08 16:29:36 ian Exp $
SHELL=/bin/bash
package=sauce
revision=$(shell dpkg-parsechangelog | sed -n 's/^Version:.*-//p')
verext=-$(revision)deb
build-indep:
$(checkdir)
rm -f settings
$(MAKE) prefix=/usr
build: build-indep
binary: binary-indep
build-arch binary-arch:
# we only produce Architecture: all packages
clean:
$(checkdir)
-rm -f build
-$(MAKE) -i distclean
-rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
binary-indep: checkroot build-indep
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp/DEBIAN debian/tmp/usr/{bin,sbin}
install -d debian/tmp/{etc,usr/share,usr/share/doc}/sauce
install -d debian/tmp/etc/{logrotate.d,init.d,userv/services.d}
install -d debian/tmp/var/{log,lib}/$(package)
install -d -m 750 debian/tmp/var/lib/$(package)/policies
$(MAKE) install install_doc prefix=debian/tmp/usr \
doc_dir=debian/tmp/usr/share/doc/sauce etc_dir=debian/tmp/etc
set -e; for f in `grep '^/etc/userv/services.d/' debian/conffiles`; do \
mv debian/tmp$$f:example debian/tmp$$f; \
done
install -m 755 debian/logrotate debian/tmp/etc/logrotate.d/sauce
install -m 755 debian/sauce-run debian/tmp/usr/sbin/sauce-run
install -m 755 debian/initd debian/tmp/etc/init.d/sauce
install -m 755 debian/{pre,post}rm debian/postinst debian/tmp/DEBIAN/.
install -m 644 debian/conffiles debian/tmp/DEBIAN/.
install -m 644 debian/copyright debian/tmp/usr/share/doc/$(package)/.
install -m 644 debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
chmod 644 debian/tmp/usr/share/doc/$(package)/*
gzip -9nv debian/tmp/usr/share/doc/$(package)/changelog.Debian
install -m 644 db.manual blmessage-*.text debian/sys-config \
debian/tmp/etc/sauce/.
install -m 755 debian/set-firewall debian/tmp/etc/sauce/.
echo '# You may put SAUCE configuration here.' \
>debian/tmp/etc/sauce/config
(echo '# You may put SAUCE policy here; load with sauce-setsyspolicy.'\
&& echo .) >debian/tmp/etc/sauce/policy
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chown -R mail.root debian/tmp/var/{lib,log}/sauce debian/tmp/etc/sauce/*
chown root.root debian/tmp/etc/sauce/sys-config
chmod -R u+w,go-ws,a+rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f sauce.tcl
endef
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
|