File: rules

package info (click to toggle)
saga 7.3.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 34,480 kB
  • sloc: cpp: 306,258; ansic: 9,209; sh: 4,256; xml: 3,101; makefile: 2,833; python: 1,044
file content (59 lines) | stat: -rwxr-xr-x 1,585 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
#!/usr/bin/make -f

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

CFLAGS += $(CPPFLAGS)

VERSION := $(shell grep '^AC_INIT' configure.ac | sed 's/AC_INIT(saga, \([0-9|\.]*\)\,.*)/\1/g')

TEMPLATES = $(wildcard debian/*.in)

templates:
	for TEMPLATE in $(TEMPLATES) ; do \
		sed -e 's/@VERSION@/$(VERSION)/g' $$TEMPLATE > `echo $$TEMPLATE | sed 's/.in$$//'` ; \
	done

%:
	dh $@ --with python3

override_dh_clean:
	dh_clean src/saga_core/saga_api/saga_api.py saga_cmd.1 saga_gui.1

override_dh_auto_configure: templates
	dh_auto_configure -- \
		--prefix=/usr \
		--disable-libfire \
		--disable-triangle \
		--enable-openmp \
		--enable-python \
		--with-system-dxflib \
		--with-system-svm \
		$(shell dpkg-buildflags --export=configure)

override_dh_auto_build:
	pod2man --section=1 --release=$(VERSION) --center " " debian/saga_gui.pod > saga_gui.1
	pod2man --section=1 --release=$(VERSION) --center " " debian/saga_cmd.pod > saga_cmd.1
	dh_auto_build

override_dh_auto_install:
	dh_auto_install

	# Remove executable bit from resource files
	chmod -x debian/*/usr/share/saga/*.*

	# Explicitly remove files not to be installed
	find $(CURDIR)/debian/tmp/usr/lib -name "*.a" -delete
	find $(CURDIR)/debian/tmp/usr/lib -name "*.la" -delete
	find $(CURDIR)/debian/tmp/usr/lib -name "*.pyc" -delete
	find $(CURDIR)/debian/tmp/usr/lib -name "*.pyo" -delete
	$(RM) -r $(CURDIR)/debian/tmp/usr/include

override_dh_install:
	dh_install --list-missing

override_dh_python3:
	dh_python3 --no-ext-rename

override_dh_makeshlibs:
	dh_makeshlibs -Xpython3-saga