debian swirl logo

Back to the packages list zimlib

#!/usr/bin/make -f

debian/control:: debian/control.in
DEB_PHONY_RULES += debian/control.in
debian/control.in::
		sed -e 's/__LIBPKGNAME__/$(libpkg)/g' debian/control.in

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_AUTOCONF = 2.69
DEB_AUTO_UPDATE_AUTOHEADER = 2.69
DEB_AUTO_UPDATE_ACLOCAL = 1.14
DEB_AUTO_UPDATE_AUTOMAKE = 1.14

include /usr/share/pkg-kde-tools/makefiles/1/cdbs/symbolshelper.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/upstream-tarball.mk

# TODO: remove the line below once the ibzim0.symbols files is usable
# on all architectures
#export DPKG_GENSYMBOLS_CHECK_LEVEL=0

stem = zim
major = 0
lib = lib$(stem)
libpkg = lib$(stem)$(major)
devpkg = lib$(stem)-dev

# Upstream Tarball Handling
DEB_UPSTREAM_URL = http://www.openzim.org/download
DEB_UPSTREAM_TARBALL_MD5= 03813f263591347ecb3d8274daab07b6

# Build depends for packaging
CDBS_BUILD_DEPENDS += , d-shlibs (>= 0.48)

# Build depends required by upstream
CDBS_BUILD_DEPENDS += , liblzma-dev, libcxxtools-dev, pkg-kde-tools,

# Multiarch quirks (see also d-shlibs use of the variable further down)
CDBS_PREDEPENDS_$(libpkg) = $(if $(DEB_HOST_MULTIARCH),multiarch-support)
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

# Run unit tests shipped by upstream
DEB_CONFIGURE_EXTRA_FLAGS += --enable-unittest
DEB_MAKE_CHECK_TARGET = test

# Let d-shlibs calculate development package dependencies
#  and handle shared library install
binary-post-install/$(libpkg) binary-post-install/$(devpkg):: debian/stamp-local-shlibs-$(lib)
debian/stamp-local-shlibs-$(lib): binary-install/$(libpkg) binary-install/$(devpkg)
		d-shlibmove --commit \
			--devunversioned \
			--multiarch \
			--exclude-la \
			--override s/$(lib)$(major)-dev/$(lib)-dev/ \
			--override s/liblzma5-dev/liblzma-dev/ \
			--movedev "debian/tmp/usr/include/*" usr/include/ \
			debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$(lib).so
		touch $@
clean::
		rm -f debian/stamp-local-shlibs-$(lib)

# These autotools related file by upstream gets modified by us because
# of mismatch in autotools version. DEB_UPSTREAM_CRUFT_MOVE preserves
# them and reverts them back after the build.
DEB_UPSTREAM_CRUFT_MOVE = aclocal.m4 ltmain.sh configure m4/libtool.m4
DEB_UPSTREAM_CRUFT_MOVE += Makefile.in examples/Makefile.in include/Makefile.in
DEB_UPSTREAM_CRUFT_MOVE += src/tools/Makefile.in test/Makefile.in src/Makefile.in
DEB_UPSTREAM_CRUFT_MOVE += m4/ltoptions.m4 m4/ltversion.m4 m4/lt~obsolete.m4

Builds:

libzim0-dbg
library implementation of zim specifications (debug symbols)
libzim0
library implementation of zim specifications
libzim-dev
library implementation of zim specifications (development)