#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright © 2009-2010, Jonas Smedegaard # 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 . 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