File: rules

package info (click to toggle)
profanity 0.16.0-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 5,204 kB
  • sloc: ansic: 78,705; makefile: 543; python: 212; sh: 179
file content (62 lines) | stat: -rwxr-xr-x 1,903 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Export all hardening flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

FLAGS_profanity_light = \
	--buildtype=release \
	-Dc-plugins=enabled \
	-Domemo=enabled \
	-Domemo-backend=libomemo-c \
	-Dotr=enabled \
	-Dpgp=enabled
FLAGS_profanity_full = $(FLAGS_profanity_light) \
	-Dpython-plugins=enabled \
	-Dnotifications=enabled \
	-Dicons-and-clipboard=enabled \
	-Dgdk-pixbuf=enabled \
	-Domemo-qrcode=enabled \
	-Dxscreensaver=enabled

BUILDDIR_LIGHT := $(CURDIR)/debian/build-light
BUILDDIR_FULL := $(CURDIR)/debian/build-full

%:
	dh $@ --buildsystem=meson

override_dh_auto_configure: src/gitversion.h.in
	dh_auto_configure --builddirectory=$(BUILDDIR_LIGHT) -- $(FLAGS_profanity_light)
	PYTHON_VERSION=3; export PYTHON_VERSION; \
	dh_auto_configure --builddirectory=$(BUILDDIR_FULL) -- $(FLAGS_profanity_full)

override_dh_auto_build:
	dh_auto_build --builddirectory=$(BUILDDIR_LIGHT)
	dh_auto_build --builddirectory=$(BUILDDIR_FULL)

fix_whatis:
	-mkdir man
	for manpage in docs/*.1; do \
	    sed '0,/^\/.*/s|^\(/.*\)|\1 \\- the Profanity \1 command.|' < $$manpage > man/$$(basename $$manpage); \
	done

override_dh_auto_install: fix_whatis
	dh_auto_install --builddirectory=$(BUILDDIR_LIGHT) --destdir=$(BUILDDIR_LIGHT).inst
	dh_auto_install --builddirectory=$(BUILDDIR_FULL) --destdir=$(BUILDDIR_FULL).inst

override_dh_auto_test:
	dh_auto_test --builddirectory=$(BUILDDIR_LIGHT)
	dh_auto_test --builddirectory=$(BUILDDIR_FULL)

override_dh_auto_clean:
	dh_auto_clean
	rm -fr $(BUILDDIR_FULL) $(BUILDDIR_LIGHT) $(BUILDDIR_FULL).inst $(BUILDDIR_LIGHT).inst

src/gitversion.h.in:
	echo "#ifndef PROF_GIT_BRANCH" > $@
	echo "#define PROF_GIT_BRANCH \"debian/experimental\"" >> $@
	echo "#endif" >> $@
	echo "#ifndef PROF_GIT_REVISION" >> $@
	echo "#define PROF_GIT_REVISION \"$(dpkg-parsechangelog --show-field Version)\"" >> $@
	echo "#endif" >> $@

.PHONY: fix_whatis