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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
#!/usr/bin/make -f
#
# Robert Jordens <jordens@debian.org>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
#
# $Id: rules 299 2004-02-29 13:23:03Z rj $
#
### include the CDBS libraries ###
include /usr/share/cdbs/1/class/makefile.mk
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed 's/-[^-]*$$//')
DEB_UPSTREAM_TARBALL_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/+[^+]*$$//')
DEB_TAR_SRCDIR := $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION)
# tarball has to be first because of #205396
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
### set up the variables ###
ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
ifeq ($(DEB_BUILD_OPTIONS),$(PARALLEL_JOBS))
PARALLEL_JOBS := $(shell if [ -f /proc/cpuinfo ]; \
then echo `cat /proc/cpuinfo | grep 'processor' | wc -l`; \
else echo 1; fi)
endif
NJOBS := -j$(PARALLEL_JOBS)
endif
DEB_MAKE_ENVVARS := MAKEFLAGS=$(NJOBS)
DEB_CONFIGURE_EXTRA_FLAGS := \
--enable-development-build --enable-gtk --enable-gui \
--enable-nls --enable-ksi=no
# I think NJOBS needs dependency-tracking
# --disable-dependency-tracking
# disabled, fails on k6; read Bug#234371
# ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
# do optimization for the different architectures
# TODO: powerpc optimization needs check and testing
# ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
# DEB_CONFIGURE_EXTRA_FLAGS += --enable-optimize
# OPTI_FLAGS := -D_REENTRANT -O6 -mcpu=i686 -march=i686 \
# -fomit-frame-pointer -ffast-math -fstrength-reduce \
# -fmove-all-movables
# CXXFLAGS += $(OPTI_FLAGS)
# CFLAGS += $(OPTI_FLAGS)
# else
DEB_CONFIGURE_EXTRA_FLAGS += --disable-optimize
# endif
# endif
# TODO: this is bad, but stop cdbs from mangling CFLAGS
#_cdbs_class_langcore := 1
DEB_DH_MAKESHLIBS_ARGS := -V
DEB_SHLIBDEPS_INCLUDE := debian/libardour0/usr/lib debian/libgtkmmext0/usr/lib\
debian/libpbd0/usr/lib debian/libmidi++0/usr/lib
DEB_INSTALL_DOCS_ALL := $(shell cat debian/docs)
DEB_INSTALL_CHANGELOGS_ALL := $(DEB_BUILDDIR)/ChangeLog
DEB_DH_STRIP_ARGS := --dbg-package=libardour0 --dbg-package=libpbd0 \
--dbg-package=libmidi++0 \
--dbg-package=libgtkmmext0 --dbg-package=ardour-gtk \
--dbg-package=ardour-ksi
# keep the autobuilders from building the documentation
# TODO: this doesn't work as desired.
DEB_BUILD_DEPENDENCIES := build-arch
### finetuning and hooking special rules ###
post-patches:: debian/stamp-autotools-maintregen-arch
debian/stamp-autotools-maintregen-arch:
cd $(DEB_BUILDDIR); sh ./autogen.sh
touch debian/stamp-autotools-maintregen-arch
# after the directories are created but before dh_compress is run.
common-binary-post-install-arch::
dh_buildinfo
install/ardour-ksi::
mv debian/tmp/usr/bin/ksi \
debian/tmp/usr/bin/ardour-ksi
mv debian/tmp/usr/bin/remote_kbd \
debian/tmp/usr/bin/ardour-remote-kbd
clean::
-rm -f debian/stamp-autotools-maintregen-arch
# maybe after this CDBS should only unapply the patches und then revert to the
# state right before invocation of "make". Then we could us the
# autotools clean and this:
# -find $(DEB_BUILDDIR) \
# -name "autom4te.cache" -or -name "Makefile.in" \
# -or -name "configure.in" -or -name "configure" \
# -or -name "config.sub" -or -name "config.guess" \
# -or -name "config.rpath" \
# -or -name "ltmain.sh" -or -name "aclocal.m4" \
# -or -name "config.h.in" -or -name "config.log" \
# -or \( -type d -and -name "m4" \) \
# | xargs rm -rf 2>&1 > /dev/null
# -rm -rf $(DEB_BUILDDIR)/aclocal/*.m4
### private rules making maintaining easier ###
.PHONY: update-ardour-tarball
update-ardour-tarball:
wget http://ardour.org/releases/$(DEB_TAR_SRCDIR).tar.bz2
dch -a "$(DEB_TAR_SRCDIR).tar.bz2: new upstream release"
.PHONY: update-create-orig-tarball
update-create-orig-tarball:
mkdir -p tmp-orig-tree/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
cp *.tar.* tmp-orig-tree/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
tar -C tmp-orig-tree -czvf \
../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
.PHONY: update-clean
update-clean:
rm -rf ardour_current-cvs.tar.bz2 tmp-cvs-tarball \
tmp-orig-tree
clean:: update-clean
.PHONY: update-cvs-snapshot
update-cvs-snapshot:
cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/ardour \
rdiff -u -r ardour-$(DEB_UPSTREAM_TARBALL_VERSION) \
-r HEAD ardour | \
filterdiff -x '*.cvsignore' -x '*autogen.sh' \
> debian/patches/01_$(DEB_UPSTREAM_TARBALL_VERSION)-cvs`date +%y%m%d`.patch
dch -a "debian/patches/01_$(DEB_UPSTREAM_TARBALL_VERSION)-cvs`date +%y%m%d`.patch: added from cvs"
|