File: rules

package info (click to toggle)
midori 0.5.11-ds1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,456 kB
  • ctags: 3,445
  • sloc: ansic: 43,079; sh: 684; sql: 163; python: 126; makefile: 32
file content (55 lines) | stat: -rwxr-xr-x 1,783 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
#!/usr/bin/make -f
# output every command that modifies files on the build system.
#DH_VERBOSE = 1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Necessary for the configuration file (xdg).
DISTRO = $(shell lsb_release -is)
CONFIG_FILE = debian/config/$(DISTRO).conf
ifneq (0, $(shell test -f $(CONFIG_FILE); echo "$$?"))
	DISTRO = Debian
endif

%:
	dh $@ --buildsystem=cmake --builddirectory=_build/

# Midori uses a "poor man's configure" which only accepts a minimal,
# pre-defined set of flags.  Therefore, we invoke cmake directly here.
override_dh_auto_configure:
	dh_auto_configure -- \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_SYSCONFDIR=/etc \
	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
	..

# cmake does not emit useful information when compiling the source
# files.  We use VERBOSE here for that.
override_dh_auto_build:
	dh_auto_build -- VERBOSE=1

# We have to override 'make check' because it needs to run under
# xvfb-run.  And some tests still fail.
override_dh_auto_test:
	(cd _build && xvfb-run make check) || true

override_dh_auto_install:
	dh_auto_install
	rm -f debian/midori/usr/share/doc/midori/COPYING debian/midori/usr/share/doc/midori/TRANSLATE
	install -m 0644 debian/$(DISTRO)-config debian/midori/etc/xdg/midori/config

# Updating the alternatives priority
PRIORITY = $(shell sed -ne 's/^DEBIAN_WWW_ALTERNATIVES_PRIORITY \([0-9]\+\)/\1/p' $(CONFIG_FILE))

debian/midori.postinst: debian/midori.postinst.base
	sed 's/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g' debian/midori.postinst.base > debian/midori.postinst

override_dh_installdeb: debian/midori.postinst
	dh_installdeb

override_dh_installchangelogs:
	rm -f debian/midori/usr/share/doc/midori/ChangeLog
	dh_installchangelogs