debian swirl logo

Back to the packages list jbig2dec

#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2010 Jonas Smedegaard 
# Description: Main Debian packaging script for jbig2dec
#
# 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, see .

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_ACLOCAL = 1.11
DEB_AUTO_UPDATE_AUTOCONF = 2.68
DEB_AUTO_UPDATE_AUTOHEADER = 2.68
DEB_AUTO_UPDATE_AUTOMAKE = 1.11
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

libname = lib$(DEB_UPSTREAM_PACKAGE)
soname = 0
pkgname = $(libname)$(soname)

DEB_UPSTREAM_URL = http://ghostscript.com/~giles/jbig2/$(DEB_UPSTREAM_PACKAGE)/
DEB_UPSTREAM_TARBALL_MD5 = 1f61e144852c86563fee6e5ddced63f1

# bootstrap autotools files (CDBS normally only updates them)
DEB_MAKE_CLEAN_TARGET = distclean
DEB_AUTOMAKE_ARGS = --add-missing --copy
clean::
		rm -f Makefile.in aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing

DEB_MAKE_CHECK_TARGET = check

DEB_INSTALL_MANPAGES_jbig2dec = debian/tmp/usr/share/man/man1/*

DEB_SHLIBDEPS_LIBRARY_$(pkgname) = $(libname)
DEB_DH_MAKESHLIBS_ARGS = -Pdebian/$(cdbs_curpkg)

# put aside upstream-shipped temp files during build but after copyright-check
upstreamtmpfiles = config_types.h
pre-build:: debian/stamp-upstreamtmpstuff
debian/stamp-upstreamtmpstuff: debian/stamp-copyright-check
		for file in $(upstreamtmpfiles); do \
			[ ! -e $$file ] || [ -e $$file.upstream ] || mv $$file $$file.upstream; \
		done
		touch $@
clean::
		for file in $(upstreamtmpfiles); do \
			[ ! -e $$file.upstream ] || mv -f $$file.upstream $$file; \
		done
		rm -f debian/stamp-upstreamtmpstuff

# Let d-shlibs resolve dependencies for and install library files
CDBS_BUILD_DEPENDS += , d-shlibs (>= 0.45~)
binary-post-install/$(pkgname):: debian/stamp-local-shlibs-$(libname)
debian/stamp-local-shlibs-$(libname): binary-install/$(pkgname)
		d-shlibmove --commit \
			--exclude-la \
			--movedev "debian/tmp/usr/include/*" usr/include/ \
			debian/tmp/usr/lib/$(libname).so
		touch $@
clean::
		rm -f debian/stamp-local-shlibs-$(libname)

# Needed by by upstream build routines
CDBS_BUILD_DEPENDS += , libpng-dev

# Needed by upstream tests
CDBS_BUILD_DEPENDS += , python

Builds:

jbig2dec
jbig2 decoder library - tools
libjbig2dec0-dev
jbig2 decoder library - development files
libjbig2dec0
jbig2 decoder library - shared libraries