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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# minimise needless linking
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
plugins := applix babelfish bmp clarisworks collab command docbook \
eml epub freetranslation garble gdict gimp google grammar hancom \
hrtext iscii kword latex loadbindings mht mif mswrite \
opendocument openwriter openxml opml ots paint passepartout pdb \
pdf presentation s5 sdw t602 urldict wikipedia wmf wml \
wordperfect wpg xslfo goffice
# plugin 'aiksaurus' disabled until aiksaurus is ported to gtk3
# plugin 'rsvg' deliberately not used due to build problems. Is it deprecated?
# plugin 'mathview' deliberately not used due to bug#785485
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(DEB_SOURCE)
ifneq (,$(wildcard configure.*))
# API version
apiver:=$(shell perl -0ne 'print "$$1.$$2" if m{\[abi_version_major\],\s+\[(\d+)\].*?\[abi_version_minor\],\s+\[(\d+)\]}s' configure.*)
endif
# The base library name
plib=lib$(PKG)-$(apiver)
%:
dh $@
override_dh_clean:
## adaptive cleaning meant to work for source archive or repository checkout.
## clean files only if possible to regenerate
[ ! -x "$(which flex)" ] || $(RM) -v plugins/mathview/itex2mml/lex.yy.c
[ ! -x "tools/cdump/xp/cdump.pl" ] || $(RM) -v src/wp/ap/xp/ap_wp_sidebar.cpp
[ ! -x "./autogen-common.sh" ] || $(RM) -v plugin*.m4 po/*.strings
dh_clean
override_dh_autoreconf:
$(info I: library-name=$(plib))
$(if $(wildcard debian/$(plib).install),,$(error invalid package/library name.))
# make plugins configuration if building from trunk
[ ! -x "./autogen-common.sh" ] || ./autogen-common.sh
dh_autoreconf --as-needed
#: Build instructions http://www.abisource.com/~fjf/BUILD.phtml
#: configure options reference: http://www.abisource.com/wiki/Compiling_AbiWord
override_dh_auto_configure:
dh_auto_configure -- \
--with-gio \
--with-redland \
--with-libtidy \
--with-goffice \
--enable-shared \
--enable-clipart \
--enable-templates \
--with-gnomevfs \
--enable-collab-backend-tcp \
--enable-collab-backend-xmpp \
--enable-collab-backend-sugar \
--enable-collab-backend-service \
--enable-collab-backend-telepathy \
--enable-dependency-tracking \
--enable-plugins="$(plugins)" \
--enable-introspection
# --enable-debug \
override_dh_auto_test:
# do not stop on failed test(s)
-dh_auto_test
override_dh_makeshlibs:
dh_makeshlibs -V
override_dh_strip:
dh_strip --dbgsym-migration='abiword-dbg (<< 3.0.1-7~)'
override_dh_install:
find debian/tmp -name '*.la' -print -delete
dh_install
# This needs to be installed by abiword-plugin-grammar only
$(RM) -v debian/abiword/usr/lib/*/abiword-*/plugins/grammar.*
override_dh_missing:
dh_missing --fail-missing
|