File: rules

package info (click to toggle)
mailutils 1%3A3.15-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 36,672 kB
  • sloc: ansic: 181,539; sh: 110,509; yacc: 7,458; cpp: 3,834; makefile: 3,152; lex: 1,972; python: 1,617; exp: 1,562; awk: 152; lisp: 132; sed: 31
file content (81 lines) | stat: -rwxr-xr-x 2,255 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
#!/usr/bin/make -f

%:
	dh $@ --with python3

# Enable hardening flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed

# Enable verbose output on the testsuite if a debug build is requested
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   RUNTESTFLAGS = -v -v -v --debug
endif

ifeq (,$(filter noguile,$(DEB_BUILD_PROFILES)))
  WITH_GUILE=  --with-guile
endif

override_dh_auto_configure:
	DEFAULT_CUPS_CONFDIR=/usr/share/cups/mime \
	MU_SIEVE_MODDIR=\$${libdir}/mailutils9 \
	dh_auto_configure -- \
	  --with-lispdir=\$${prefix}/share/emacs/site-lisp \
	  --enable-virtual-domains \
	  --enable-mh \
	  --enable-python \
	  --with-gnutls \
	  --with-berkeley-db \
	  --with-gdbm \
	  --with-kyotocabinet \
	  --with-gssapi \
	  --with-gsasl \
	  --with-mysql \
	  --with-postgres \
	  --disable-rpath \
	  --disable-static \
	  --disable-cxx \
	  --disable-nntp \
	  $(WITH_GUILE)

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C doc html

override_dh_auto_install:
	dh_auto_install
	# 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
	chmod 755 $(CURDIR)/debian/tmp/usr/sbin/mda
	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
	chmod 4755 $(CURDIR)/debian/tmp/usr/sbin/mda

	# Get rid of files we don't want to install
	find $(CURDIR)/debian/tmp -name "*.pyc" -delete
	find $(CURDIR)/debian/tmp -name "*.la" -delete
	find $(CURDIR)/debian/tmp/usr/share/man/man1 -name "*.1" -delete

override_dh_install:
	dh_install -plibmailutils9 -Xlibmu_dbm
	dh_install --remaining-packages

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -k check RUNTESTFLAGS="$(RUNTESTFLAGS)" || true
endif

override_dh_fixperms:
	dh_fixperms -Xdotlock.mailutils