File: rules

package info (click to toggle)
ijs 0.35-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,656 kB
  • sloc: sh: 8,046; ansic: 3,053; makefile: 265
file content (85 lines) | stat: -rwxr-xr-x 3,301 bytes parent folder | download | duplicates (3)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2008, Bradley Smith <brad@brad-smith.co.uk>
# Copyright © 2011, Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for IJS
#
# 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/>.

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_AUTOCONF = 2.68
DEB_AUTO_UPDATE_ACLOCAL = 1.11
DEB_AUTO_UPDATE_AUTOMAKE = 1.11
DEB_AUTOMAKE_ARGS = --add-missing
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk

libpkgname = libijs-$(DEB_UPSTREAM_VERSION)

DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(ijs_spec\.pdf|debian/(changelog|copyright(|_hints|_newhints)))$

DEB_CONFIGURE_EXTRA_FLAGS += --enable-shared --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
DEB_MAKE_BUILD_TARGET =
ifneq (,$(filter libijs-dev,$(shell dh_listpackages)))
DEB_MAKE_BUILD_TARGET += all
endif
ifneq (,$(filter libijs-doc,$(shell dh_listpackages)))
DEB_MAKE_BUILD_TARGET += doc
endif

DEB_DH_MAKESHLIBS_ARGS_$(libpkgname) = -V'$(libpkgname) (>= $(DEB_UPSTREAM_VERSION))'

# put aside upstream-shipped temp files during build but after copyright-check
upstreamtmpfiles = ltmain.sh configure aclocal.m4 Makefile.in ijs_spec.pdf
pre-build:: debian/stamp-upstreamtmpstuff
debian/stamp-upstreamtmpstuff: debian/stamp-copyright-check
	for file in $(upstreamtmpfiles); do \
		[ ! -e $$file ] || [ -e $$file.upstream ] || cp -a $$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

# Make sure that all files installed is also packaged
#  * ignore debhelper-installed files (we trust dh_install*)
#  * ignore example binaries
binary: fail-missing
fail-missing: binary-arch binary-indep list-missing
	cat debian/cdbs-package-list | sort | uniq | \
		grep -v 'DEBIAN' | \
		grep -v '/usr/share/doc' | \
		grep -v '/usr/share/lintian/overrides' | \
		grep -v '/usr/share/menu' | \
		grep -v '/usr/bin/.*_example' | \
		> debian/cdbs-reduced-package-list
	cat debian/cdbs-install-list | sort | uniq | \
		> debian/cdbs-reduced-install-list
	diff -u debian/cdbs-reduced-install-list \
		debian/cdbs-reduced-package-list \
		> debian/cdbs-install-diff \
		|| true
	@if [ "`wc -l debian/cdbs-install-diff`" != "0 debian/cdbs-install-diff" ]; then \
		echo "ERROR: Differences between intermediary installed and packaged files:"; \
		echo; \
		cat debian/cdbs-install-diff; \
		echo; \
		echo "Individual binary packages may work, but whole package build failed!"; \
		exit 1; \
	fi
clean::
	rm -f debian/cdbs-reduced-package-list debian/cdbs-reduced-install-list debian/cdbs-install-diff