File: rules

package info (click to toggle)
mailutils 1%3A3.5-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 33,096 kB
  • sloc: ansic: 172,443; sh: 92,036; yacc: 7,423; cpp: 3,827; makefile: 3,169; python: 2,876; lex: 2,013; exp: 1,272; awk: 152; lisp: 132; sed: 31
file content (87 lines) | stat: -rwxr-xr-x 2,832 bytes parent folder | download
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, 2010 Jeff Bailey, Jordi Mallach.

# Enable hardening flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk

# This breaks libmu_auth linking
#DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
#include /usr/share/dpkg/default.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)

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

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   RUNTESTFLAGS = -v -v -v --debug
endif

DEB_CONFIGURE_SCRIPT_ENV += DEFAULT_CUPS_CONFDIR=/usr/share/cups/mime

DEB_CONFIGURE_LIBEXECDIR = \$${prefix}/lib/$(DEB_HOST_MULTIARCH)

DEB_CONFIGURE_EXTRA_FLAGS += \
	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

DEB_CONFIGURE_USER_FLAGS += \
	--with-lispdir=\$${prefix}/share/emacs/site-lisp \
	--enable-virtual-domains --enable-mh --enable-python \
	--with-gnutls --with-kyotocabinet --with-gssapi --with-gsasl \
	--with-guile --with-mysql --disable-rpath --disable-static \
	--disable-cxx --disable-nntp

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
DEB_MAKE_CHECK_TARGET =	check RUNTESTFLAGS="$(RUNTESTFLAGS)" || true
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

build/mailutils-doc::
	$(DEB_MAKE_INVOKE) html

binary-install/python-mailutils::
	dh_python2 -p$(cdbs_curpkg) --no-guessing-versions

DEB_DH_STRIP_ARGS := --dbgsym-migration='mailutils-dbg (<< 3.0-1~)'

DEB_FIXPERMS_EXCLUDE = dotlock.mailutils

DEB_DH_INSTALL_ARGS += --list-missing

DEB_INSTALL_DOCS_mailutils-doc = AUTHORS NEWS README THANKS TODO \
	doc/texinfo/mailutils.html
DEB_INSTALL_DOCS_mailutils-mh = mh/TODO

DEB_SHLIBDEPS_INCLUDE := $(CURDIR)/debian/libmailutils5/usr/lib/$(DEB_HOST_MULTIARCH)