File: rules

package info (click to toggle)
jbig2dec 0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,792 kB
  • ctags: 729
  • sloc: sh: 9,661; ansic: 8,029; python: 328; makefile: 71
file content (69 lines) | stat: -rwxr-xr-x 2,459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2010 Jonas Smedegaard <dr@jones.dk>
# 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 <http://www.gnu.org/licenses/>.

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

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
binary-post-install/$(pkgname):: debian/stamp-local-shlibs-$(libname)
debian/stamp-local-shlibs-$(libname): binary-install/$(pkgname)
	d-shlibmove --commit \
		--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

# Needed for our packaging
CDBS_BUILD_DEPENDS += , d-shlibs