[SCM] snd/master: switch build-system to CDBS

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Mon Jan 25 19:58:04 UTC 2016


The following commit has been merged in the master branch:
commit 705bd3d485e4a9578c73490772830163b96a9a98
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Mon Jan 25 19:19:27 2016 +0100

    switch build-system to CDBS
    
    - it has really nice support for building multiple flavours
    - i love licensecheck

diff --git a/debian/rules b/debian/rules
index 7b5c1a3..48ceee3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,86 +1,54 @@
 #!/usr/bin/make -f
-
-export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-export DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-export DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    $(info Enable parallel builds with $(NUMJOBS) jobs)
-    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    MAKEFLAGS += -j$(NUMJOBS)
-endif
-
-COMMON_CONFIGURE_ARGS=--with-ladspa \
-				--with-static-xg \
-				--enable-snd-debug \
-				--with-gmp \
-				--prefix=/usr
-
-ifeq ($(DEB_HOST_ARCH_OS),linux)
-EXTRA_CONFIGURE_ARGS=--with-alsa
-endif
-
-ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
-EXTRA_CONFIGURE_ARGS=--with-oss
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2014 IOhannes m zmölnig <zmoelnig at iem.at>
+# Description: Main Debian packaging script for snd
+#
+# 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 3, 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/>.
+
+# needs to be declared before including makefile.mk
+DEB_MAKE_FLAVORS = nox gtk-jack gtk-pulse
+
+DEB_BUILDDIR = build
+
+export AUTOHEADER=true
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/autoreconf.mk
+#include /usr/share/cdbs/1/rules/utils.mk
+
+DEB_CONFIGURE_EXTRA_FLAGS = \
+	--with-ladspa \
+	--with-gmp \
+	--prefix=/usr
+
+# per flavor configure options
+DEB_CONFIGURE_EXTRA_FLAGS_nox       = --without-gui
+ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS)))
+DEB_CONFIGURE_EXTRA_FLAGS_nox += --with-alsa
+else
+DEB_CONFIGURE_EXTRA_FLAGS_nox += --with-oss
 endif
+DEB_CONFIGURE_EXTRA_FLAGS_gtk-jack  = --with-gtk --with-jack
+DEB_CONFIGURE_EXTRA_FLAGS_gtk-pulse = --with-gtk --with-pulseaudio
+DEB_CONFIGURE_EXTRA_FLAGS += $(DEB_CONFIGURE_EXTRA_FLAGS_$(cdbs_make_curflavor))
 
-ifeq ($(DEB_HOST_ARCH_OS),hurd)
-EXTRA_CONFIGURE_ARGS=--with-oss
-endif
 
-%:
-	dh $@ --with=autoreconf
-
-autoreconf:
-	autoreconf -f -i
-	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./
-
-override_dh_autoreconf:
-	AUTOHEADER=true dh_autoreconf debian/rules -- autoreconf
-
-override_dh_auto_clean:
-	dh_auto_clean
-	#rm -f sndlib.h
-	rm -f po/Makefile po/Makefile.in po/POTFILES
-
-override_dh_auto_configure:
-override_dh_auto_build:
-override_dh_auto_install:
-	# First, build without GUI
-	./configure $(COMMON_CONFIGURE_ARGS)    \
-			$(EXTRA_CONFIGURE_ARGS) \
-			--with-no-gui
-	$(MAKE)
-	dh_install -psnd-nox
-	dh_installman -psnd-nox snd.1
-	# Clean the tree
-	$(MAKE) distclean
-
-	# then, build with PulseAudio
-	./configure $(COMMON_CONFIGURE_ARGS) \
-			--with-gtk \
-			--with-pulseaudio
-	$(MAKE) AUDIO_LIB="$(shell pkg-config --libs libpulse-simple)"
-	dh_install -psnd-gtk-pulse
-	dh_installman -psnd-gtk-pulse snd.1
-	# Clean the tree
-	$(MAKE) distclean
-
-	# finally, build with JACK
-ifneq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:i386:powerpc:amd64:))
-	./configure $(COMMON_CONFIGURE_ARGS) \
-			--with-gtk \
-			--with-jack
-	$(MAKE)
-	dh_install -psnd-gtk-jack
-	dh_installman -psnd-gtk-jack snd.1
-	# Clean the tree
-	$(MAKE) distclean
-endif
+## pulse
+#$(MAKE) AUDIO_LIB="$(shell pkg-config --libs libpulse-simple)"
+DEB_MAKE_EXTRA_ARGS_gtk-pulse=AUDIO_LIB="$(shell pkg-config --libs libpulse-simple)"
+DEB_MAKE_EXTRA_ARGS += $(DEB_MAKE_EXTRA_ARGS_$(cdbs_make_curflavor))
 
-override_dh_install:
-	dh_install -psnd
-	dh_install -psnd-doc
 
-override_dh_installchangelogs:
-	dh_installchangelogs HISTORY.Snd
+DEB_INSTALL_CHANGELOGS_ALL=HISTORY.Snd

-- 
snd packaging



More information about the pkg-multimedia-commits mailing list