debian swirl logo

Back to the packages list libiptcdata

#!/usr/bin/make -f
# debian/rules for libiptcdata package
# Copyright (C) 2006-2007 Sylvain Le Gall 
# Copyright (C) 2006-2007 Ian Wienand 
# Copyright (C) 2006 Hubert Figuiere 
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.

# Generate debian/control using
# fakeroot debian/rules debian/control DEB_AUTO_UPDATE_DEBIAN_CONTROL:=yes

DEB_DH_INSTALL_SOURCEDIR = $(CURDIR)/debian/tmp

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 $(CURDIR)/debian/mk/docbook-manpage.mk

PY_VERSIONS = $(shell pyversions --requested debian/control)

DEB_BUILDDIR := build

DEB_CONFIGURE_EXTRA_FLAGS := --enable-python --enable-gtk-doc

configure-stamp-%:
		mkdir build-$*
	cd build-$* && PYTHON= `which $*` $(DEB_CONFIGURE_SCRIPT_ENV) \
		    $(DEB_CONFIGURE_SCRIPT) \
			$(DEB_CONFIGURE_NORMAL_ARGS) \
			--disable-maintainer-mode \
			$(cdbs_configure_flags) \
			$(DEB_CONFIGURE_EXTRA_FLAGS) \
			$(DEB_CONFIGURE_USER_FLAGS)
		touch $@


configure/python-iptcdata:: $(addprefix configure-stamp-, $(PY_VERSIONS))

build-stamp-%:
		make -C build-$*
		touch $@

build/python-iptcdata:: $(addprefix build-stamp-, $(PY_VERSIONS))

build/libiptcdata-bin:: docbook-manpage

install-stamp-%:
	make -C build-$* install DESTDIR= $(CURDIR)/debian/tmp
		touch $@

install/python-iptcdata:: $(addprefix install-stamp-, $(PY_VERSIONS))

binary-install/python-iptcdata::
		dh_python2

DEB_INSTALL_MANPAGES_libiptcdata-bin := debian/xml-man/en/iptc.1

PO4A_SOURCES := $(CURDIR)/debian/xml-man/po4a/po4a.cfg

DOCBOOK_MANPAGE_SOURCES := $(CURDIR)/debian/xml-man/en/iptc.xml

DOCBOOK_MANPAGE_EXTRA_SOURCES := $(CURDIR)/debian/xml-man/en/license.xml      \
					 $(CURDIR)/debian/xml-man/en/refentryinfo.xml

clean::
		-$(RM) $(CURDIR)/debian/xml-man/en/iptc.1
		-$(RM) -r $(DEB_BUILDDIR)
		-$(RM) -r $(addprefix $(CURDIR)/build-, $(PY_VERSIONS))
		-$(RM) -r $(addprefix $(CURDIR)/configure-stamp-, $(PY_VERSIONS))
		-$(RM) -r $(addprefix $(CURDIR)/build-stamp-, $(PY_VERSIONS))
		-$(RM) -r $(addprefix $(CURDIR)/install-stamp-, $(PY_VERSIONS))

Builds:

libiptcdata0-dbg
library to parse iptc metadata (debug files)
libiptcdata0-dev
library to parse iptc metadata (development files)
libiptcdata0
library to parse iptc metadata
libiptcdata-bin
library to parse iptc metadata (programs)
libiptcdata-doc
library to parse iptc metadata (documentation)
python-iptcdata
python bindings for the iptcdata library