File: rules

package info (click to toggle)
kannel-sqlbox 0.7.2-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 756 kB
  • sloc: sh: 7,983; ansic: 2,726; xml: 1,485; makefile: 112
file content (78 lines) | stat: -rwxr-xr-x 3,154 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
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2010, Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for sqlbox
#
# 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 = ,
DEB_AUTO_UPDATE_ACLOCAL = ,
DEB_AUTO_UPDATE_AUTOMAKE = ,
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

# lock binary package to kannel: require binNMU on upstream version change
kannel-pkgver := $(shell gw-config --version)
CDBS_DEPENDS_kannel = kannel (>= $(kannel-pkgver)), kannel (<< $(kannel-pkgver).1)

# workaround for docs not built by default
DEB_CONFIGURE_EXTRA_FLAGS += --enable-docs
DEB_MAKE_BUILD_TARGET = all docs

# workaround for broken autotools OLDJADE/JADE detection
#DEB_MAKE_ENVVARS += JADE=openjade
DEB_MAKE_EXTRA_ARGS += JADE=openjade

# workaround for FreeTDS only expected below /usr/local by default
#  * recent kannel-dev needed for its linkage to freetds-dev
CDBS_BUILD_DEPENDS += , kannel-dev (>= 1.4.4-2~)
DEB_CONFIGURE_EXTRA_FLAGS += --with-mssql=/usr

# Avoid virtually empty NEWS
DEB_INSTALL_DOCS_ALL = README UPGRADE

DEB_INSTALL_DOCS_ALL += doc/userguide.html doc/userguide.pdf

# bootstrap autotools files (CDBS normally only updates them)
DEB_MAKE_CLEAN_TARGET = distclean
DEB_AUTOMAKE_ARGS = --add-missing --copy
pre-build::
	touch aclocal.m4
clean::
	rm -f Makefile.in aclocal.m4 autotools/depcomp autotools/install-sh autotools/missing configure gw/Makefile.in
	rm -f doc/userguide.html doc/userguide.pdf doc/userguide.ps doc/userguide.rtf

# put aside stray upstream-shipped autotools file during build but after copyright-check
upstreamtmpfiles = autotools/ltmain.sh
pre-build:: debian/stamp-upstreamtmpstuff
debian/stamp-upstreamtmpstuff:
	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

# Install configfile both as sample and (like upstream rpm script) for real
DEB_INSTALL_EXAMPLES_kannel-sqlbox = example/sqlbox.conf.example
binary-install/kannel-sqlbox::
	install -D -m 0640 example/sqlbox.conf.example $(DEB_DESTDIR)/etc/kannel/sqlbox.conf

# Needed by upstream build process
#  TODO: Add openjade fallback to jade, when autotools OLDJADE/JADE detection is fixed
CDBS_BUILD_DEPENDS +=, openjade, texlive-formats-extra, texlive-base-bin, transfig, imagemagick, docbook-dsssl