#!/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