File: rules

package info (click to toggle)
clonalorigin 1.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,800 kB
  • sloc: cpp: 10,488; perl: 349; xml: 130; makefile: 48; sh: 33
file content (39 lines) | stat: -rwxr-xr-x 915 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
#!/usr/bin/make -f

# DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# export QT_SELECT=qt5

include /usr/share/dpkg/default.mk

%:
	dh $@ --sourcedirectory=warg

execute_before_dh_auto_configure:
	cp -v warg/src/truth.xml warg/src/truth.xml.preserve

execute_after_dh_auto_clean:
	test ! -e warg/src/truth.xml.preserve \
	|| mv -v warg/src/truth.xml.preserve warg/src/truth.xml

# GUI does not work - so there is no need to build it
# see https://lists.debian.org/debian-mentors/2017/12/msg00025.html
ifeq ($(QT_SELECT),qt5)
override_dh_auto_configure:
	dh_auto_configure
	cd gui && qmake

override_dh_auto_build:
	dh_auto_build
	cd gui && make
endif

override_dh_install:
	dh_install
ifeq ($(QT_SELECT),qt5)
	mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)-gui/usr/bin
	cp -a gui/gui $(CURDIR)/debian/$(DEB_SOURCE)-gui/usr/bin/$(DEB_SOURCE)-gui
endif
	rename 's/\.pl//' debian/$(DEB_SOURCE)/usr/bin/*.pl