summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2014-05-11 22:09:52 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2014-05-11 22:09:52 +0100
commit3525014850e3800ac7b28fd34e7f7af427f1c620 (patch)
tree3d1b8a17b86cfa9af178ceb818a4dc9daf52a46b /debian/rules
sword (1.7.2+dfsg-2) unstable; urgency=medium
* Correct shared library symlink. (Closes: #747420) # imported from the archive
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..122ff73
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,48 @@
+#!/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)
+
+WFLAGS := -Wall -Werror
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(WFLAGS)
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) $(WFLAGS)
+
+%:
+ dh $@
+override_dh_auto_configure:
+ dh_auto_configure -Scmake -- \
+ -DLIBSWORD_LIBRARY_TYPE="Shared Static" \
+ -DLIBSWORD_SOVERSION=10 \
+ -DSWORD_GLOBAL_CONF_DIR='/etc' \
+ -DCMAKE_BUILD_TYPE=NONE \
+ -DSWORD_BUILD_TESTS="Yes" \
+ -DCLucene_FIND_REQUIRED="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_test:
+ $(shell cd tests/testsuite && ./runall.sh 1>&2)
+override_dh_auto_install:
+ dh_auto_install -Scmake
+override_dh_install:
+ chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/*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
+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)