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
|
#!/usr/bin/make -f
SHELL+= -e
D := $(CURDIR)/debian/sm-archive
##############################################################################
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
##############################################################################
clean:
rm -rf .stamp-* config.sub config.guess
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
config.status:
ln -sf /usr/share/misc/config.sub /usr/share/misc/config.guess .
LDFLAGS='$(LDFLAGS) -L/usr/lib/libmilter' \
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
build: .stamp-build
.stamp-build: config.status
dh_testdir
$(MAKE)
touch $@
install: .stamp-build checkroot
dh_testdir
dh_prep
$(MAKE) install DESTDIR=$D htmldir='$${datadir}/doc/sm-archive'
cd $D/usr/share/doc/sm-archive/ && rm AUTHORS ChangeLog COPYING README
mkdir $D/usr/share/doc/sm-archive/html/
cd $D/usr/share/doc/sm-archive/ && mv *.html html/
mv $D/etc/sm-archive/sm-archive.conf $D/etc/sm-archive.conf
rm -r $D/etc/sm-archive/
mv $D/usr/sbin/smarchive $D/usr/sbin/sm-archive
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs NEWS
dh_installinit
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch
get-orig-source:
cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
uscan --rename --force-download --destdir $(CURDIR)
checkroot:
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep unpack build clean checkroot get-orig-source
|