File: rules

package info (click to toggle)
sword 1.7.3%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,528 kB
  • ctags: 5,477
  • sloc: cpp: 41,528; sh: 11,924; ansic: 6,450; objc: 1,362; makefile: 1,238; cs: 897; java: 821; perl: 784; pascal: 681; tcl: 350; xml: 180; python: 79
file content (47 lines) | stat: -rwxr-xr-x 1,697 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
#!/usr/bin/make -f
DH_VERBOSE := 1
ppa:=$(shell sed -n "1s/.*~.*/yes/p" debian/changelog)
ver:=$(shell dpkg-parsechangelog | sed -nr "2s/Version: (.*)-.*/\1/p")
bd :=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

WFLAGS   := -Wall
CFLAGS    = $(shell dpkg-buildflags --get CFLAGS) $(WFLAGS)
CXXFLAGS  = $(shell dpkg-buildflags --get CXXFLAGS) $(WFLAGS)

%:
	dh $@ --with autoreconf
override_dh_auto_configure:
	dh_auto_configure -Scmake -- \
	-DCMAKE_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \
	-DLIBSWORD_LIBRARY_TYPE="Shared Static" \
	-DLIBSWORD_SOVERSION=11v5 \
	-DSWORD_GLOBAL_CONF_DIR='/etc' \
	-DCMAKE_BUILD_TYPE=NONE \
	-DSWORD_BUILD_TESTS="Yes"
debian/man/%.1: debian/man/%.1.pod
	pod2man --release="SWORD $(ver)" --center "Sword Module Utilities" $< > $@
override_dh_auto_build: $(basename $(wildcard debian/man/*.pod))
	dh_auto_build -Scmake --parallel
override_dh_auto_install:
	dh_auto_install -Scmake
override_dh_install:
	chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*so*
	dh_install --list-missing
	# Fixes FTBFS if running binary-arch target only
	-chmod -x debian/libsword-common/usr/share/sword/locales.d/*
override_dh_strip:
	dh_strip --dbg-package=libsword-dbg
override_dh_makeshlibs:
	dh_makeshlibs -V 'libsword11v5 (>= 1.7.3+dfsg-3)'
override_dh_clean:
	dh_clean $(patsubst %.pod, %, $(wildcard debian/man/*.pod))

MAKEFILE = $(firstword $(MAKEFILE_LIST))
SOURCE_DIR = $(dir $(MAKEFILE))/..
get-orig-source:
	chmod +x $(SOURCE_DIR)/debian/dfsg.sh
	cd $(SOURCE_DIR) && uscan --force-download --rename --destdir .

override_dh_builddeb:
	dh_builddeb $(if $(ppa),-- -Zlzma)