debian swirl logo

Back to the packages list pugixml

#!/usr/bin/make -f

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


include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
-include /usr/share/cdbs/1/rules/upstream-tarball.mk

include /usr/share/cdbs/1/class/cmake.mk

stem = pugixml
major = $(firstword $(subst .,$(space),$(DEB_UPSTREAM_VERSION)))
libname = lib$(stem)
libpkgname = lib$(stem)$(major)
devpkgname = lib$(stem)-dev

# Handle upstream release
DEB_UPSTREAM_URL = http://pugixml.googlecode.com/files/
DEB_UPSTREAM_URL_MD5 = 477f4a7d75af0383f52ee6622b3f6035

# Skip checking some images (in addition to the defaults)
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(docs/images/.*\.png|debian/(changelog|copyright(|_hints|_newhints)))$

# Build the shared library
DEB_CMAKE_EXTRA_FLAGS += -DBUILD_SHARED_LIBS=1

# We need this to build the package
CDBS_BUILD_DEPENDS += cmake, d-shlibs(>= 0.48)

# Supress optional build dependencies
CDBS_BUILD_DEPENDS_rules_upstream_tarball = 
CDBS_BUILD_DEPENDS_rules_utils_copyright_check = 

# Multiarch quirks (should ideally be resolved automagically)
CDBS_BUILD_DEPENDS_rules_debhelper_buildinfo = 
CDBS_BUILD_DEPENDS_rules_buildcore_pkgrel = 
CDBS_PREDEPENDS = $(if $(DEB_HOST_MULTIARCH),multiarch-support)

# Fix the cmake invocation path
DEB_SRCDIR = scripts

# Docs installation
DEB_INSTALL_DOCS_$(stem)-doc += docs/manual docs/images docs/manual.html docs/pugixml.css docs/quickstart.html

# Install examples
DEB_INSTALL_EXAMPLES_$(devpkgname) += docs/samples

# Use only upstream version for dpkg-gensymbols
DEB_DH_MAKESHLIBS_ARGS_$(libpkgname) += -- -v$(DEB_UPSTREAM_VERSION)

# avoid unneeded .la file
binary-post-install/$(libpkgname):: debian/stamp-local-strip-la
debian/stamp-local-strip-la: binary-install/$(libpkgname)
		find debian -type f -name '*.la' -delete
		touch $@
clean::
		rm -f debian/stamp-local-strip-la

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

Builds:

libpugixml1-dbg
light-weight c++ xml processing library - debug symbols
libpugixml1
light-weight c++ xml processing library
libpugixml-dev
light-weight c++ xml processing library (development)
pugixml-doc
light-weight c++ xml processing library (documentation)