blob: f82cba423f431829bdb14929440afdd88843dac8 (
plain)
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
|
#!/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
# Hardening
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@ --with autoreconf
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
override_dh_install:
-chrpath -d debian/tmp/usr/bin/*
-chrpath -d debian/tmp/usr/lib/*so*
-chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*so*
dh_install --list-missing
# Don't embed absolute build path in wrapper scripts
sed -i '/# Add our own library path TO LD_LIBRARY_PATH/d' debian/*/usr/bin/*
sed -i '/LD_LIBRARY_PATH="\//d' debian/*/usr/bin/*
# Fixes FTBFS if running binary-arch target only
-chmod -x debian/libsword-common/usr/share/sword/locales.d/*
# Remove empty directory: usr/share/sword/modules
-rmdir debian/libsword-common/usr/share/sword/modules
override_dh_clean:
dh_clean $(patsubst %.pod, %, $(wildcard debian/man/*.pod))
override_dh_missing:
dh_missing --fail-missing
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 .
|