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
|
#!/usr/bin/make -f
# This file is PUBLIC DOMAIN.
#
# Copyright © 2001,2003, 2009 Jeff Bailey, Jordi Mallach.
DEB_PYTHON_SYSTEM := pysupport
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
PYVERS := $(shell pyversions --requested --version debian/control)
PYDEFAULTVER := $(shell pyversions --default --version)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFIGURE_FLAGS += --build=$(DEB_BUILD_GNU_TYPE)
else
CONFIGURE_FLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
# Work-around for upstream rules that try to use $(HOME), which should
# never be touched during the package build
export HOME=$(CURDIR)/junkhome
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
RUNTESTFLAGS = -v -v -v --debug
endif
DEB_CONFIGURE_USER_FLAGS += \
--with-lispdir=\$${prefix}/share/emacs/site-lisp \
--enable-virtual-domains --enable-mh \
--with-gnutls --with-gdbm --with-gssapi --with-gsasl \
--with-mysql --disable-rpath
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
DEB_MAKE_CHECK_TARGET = check RUNTESTFLAGS="$(RUNTESTFLAGS)"
else
DEB_MAKE_CHECK_TARGET =
endif
clean::
rm -f *.1 *.8
install/mailutils::
# These binaries conflict with elm-me. We need to rename them, as
# we're using alternatives for them.
cd debian/tmp; \
for i in dotlock frm from messages mail movemail readmsg; do \
mv usr/bin/$$i usr/bin/$$i.mailutils; \
done
# Generate manpages, but remove the s[ug]id bits from binaries
# so LD_LIBRARY_PATH works.
chmod 755 $(CURDIR)/debian/tmp/usr/bin/dotlock.mailutils
sh debian/mangen.sh $(CURDIR)/debian/tmp/usr
# Restore correct perms to the binaries that need it.
chmod 2755 $(CURDIR)/debian/tmp/usr/bin/dotlock.mailutils
binary-install/python-mailutils::
dh_pysupport -ppython-mailutils
DEB_FIXPERMS_EXCLUDE = dotlock.mailutils
DEB_INSTALL_DOCS_mailutils = AUTHORS NEWS README THANKS TODO
DEB_INSTALL_DOCS_mailutils-mh = mh/TODO
DEB_SHLIBDEPS_INCLUDE := $(CURDIR)/debian/libmailutils2/usr/lib
ORIG_VERSION := $(shell dpkg-parsechangelog | gawk '/^Version:/ { sub(".*:", "", $$2); sub("+.*", "", $$2); print $$2 }')
get-orig-source::
uscan --force-download --no-symlink --destdir ../tarballs
tar -C ../tarballs -zxf ../tarballs/mailutils-$(ORIG_VERSION).tar.gz
rm -rf ../tarballs/mailutils-$(ORIG_VERSION)/doc/texinfo ../tarballs/mailutils-$(ORIG_VERSION)/doc/rfc
sed -i -e's/ texinfo rfc//g' ../tarballs/mailutils-$(ORIG_VERSION)/doc/Makefile.*
sed -i -e'/ doc\/texinfo\/Makefile/d' ../tarballs/mailutils-$(ORIG_VERSION)/configure.ac
sed -i -e'/ doc\/rfc\/Makefile/d' ../tarballs/mailutils-$(ORIG_VERSION)/configure.ac
sed -i -e'/CONFIG_FILES doc\/texinfo\/Makefile/d' ../tarballs/mailutils-$(ORIG_VERSION)/configure
sed -i -e'/CONFIG_FILES doc\/rfc\/Makefile/d' ../tarballs/mailutils-$(ORIG_VERSION)/configure
sed -i -e's/ doc\/texinfo\/Makefile//' ../tarballs/mailutils-$(ORIG_VERSION)/configure
sed -i -e's/ doc\/rfc\/Makefile//' ../tarballs/mailutils-$(ORIG_VERSION)/configure
cd ../tarballs && tar zcf mailutils_$(ORIG_VERSION)+dfsg1.orig.tar.gz mailutils-$(ORIG_VERSION)
rm -rf ../tarballs/mailutils-$(ORIG_VERSION) ../tarballs/mailutils-$(ORIG_VERSION).tar.gz
|