File: rules

package info (click to toggle)
gmime 2.6.22%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,096 kB
  • ctags: 3,938
  • sloc: ansic: 42,118; makefile: 638; sh: 415; cs: 250; xml: 9; python: 8; perl: 6
file content (45 lines) | stat: -rwxr-xr-x 1,422 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# examples/Makefile is autogenerated before being shipped; we want to
# make sure it picks a standard shell for reproducibility
export CONFIG_SHELL = /bin/sh

# only invoke dh --with=cli if cli-common-dev is present
ifeq (,$(wildcard /usr/share/perl5/Debian/Debhelper/Sequence/cli.pm))
WITH_CLI = 
CONFIGURE_MONO_FLAGS = --enable-mono=no
else
WITH_CLI = ,cli
CONFIGURE_MONO_FLAGS = CSC=/usr/bin/mono-csc
endif

override_dh_auto_configure:
	dh_auto_configure -- \
		$(shell dpkg-buildflags --export=configure) \
		--enable-vala \
		--enable-gtk-doc \
		--disable-rpath \
		--enable-largefile \
		--enable-smime \
		--enable-introspection \
		$(CONFIGURE_MONO_FLAGS)

# https://bugs.debian.org/806033 -- dh_clideps expects to see
# dh_makeshlibs called before it, but dh_makeshlibs is never called
# when building only arch-indep packages.  So we force the issue by
# making a phony shlibs.local file that dh_clideps will accept, if no
# others exist:
override_dh_clideps:
	if ! grep -q . debian/*/DEBIAN/shlibs; then echo libgmime-2.6 0 libgmime-2.6-0 > debian/shlibs.local; fi
	dh_clideps
	rm -f debian/shlibs.local

override_dh_auto_build-indep: 
	dh_auto_build
	mdoc update -o $(CURDIR)/mono/monodocer $(CURDIR)/mono/gmime-sharp.dll
	mdoc assemble -o $(CURDIR)/mono/gmime-sharp-2.6 $(CURDIR)/mono/monodocer

%:
	dh $@ --with=autoreconf,gir$(WITH_CLI)