[SCM] hydrogen packaging branch, master, updated. c1ebe0bf09c1ecd0fb25fd8c5c9fb901551f74d4

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Feb 14 03:45:31 UTC 2010


The following commit has been merged in the master branch:
commit 179f4333c80a4f886a061f8100ae92ee41620a02
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sun Feb 14 02:48:06 2010 +0100

    Add and use local CDBS snippet scons.mk (and not autotools.mk).

diff --git a/debian/cdbs/1/class/scons-vars.mk b/debian/cdbs/1/class/scons-vars.mk
new file mode 100644
index 0000000..b2c71cb
--- /dev/null
+++ b/debian/cdbs/1/class/scons-vars.mk
@@ -0,0 +1,52 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2005 Matthew A. Nicholson <matt at matt-land.com>
+# Description: Defines useful variables for packages which have a SConstruct
+#              file
+#
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+
+ifndef _cdbs_bootstrap
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+endif
+
+ifndef _cdbs_class_scons_vars
+_cdbs_class_scons_vars := 1
+
+include $(_cdbs_class_path)/langcore.mk$(_cdbs_makefile_suffix)
+
+DEB_SCONS_ENVVARS = 
+DEB_SCONS_INVOKE = $(DEB_SCONS_ENVVARS) scons --directory="$(DEB_BUILDDIR)" CC="$(CC)" CFLAGS="$(if $(CFLAGS_$(cdbs_curpkg)),$(CFLAGS_$(cdbs_curpkg)),$(CFLAGS))" CXX="$(CXX)" CXXFLAGS="$(if $(CXXFLAGS_$(cdbs_curpkg)),$(CXXFLAGS_$(cdbs_curpkg)),$(CXXFLAGS))"
+
+# general options (passed on all scons commands)
+DEB_SCONS_OPTIONS =
+
+# build target and options (only passed on build)
+DEB_SCONS_BUILD_TARGET =
+DEB_SCONS_BUILD_OPTIONS =
+
+# install target and options (only passed on install)
+DEB_SCONS_INSTALL_TARGET = install
+DEB_SCONS_INSTALL_OPTIONS =
+
+# clean target
+DEB_SCONS_CLEAN_TARGET = .
+
+DEB_SCONS_CHECK_TARGET =
+
+endif
diff --git a/debian/cdbs/1/class/scons.mk b/debian/cdbs/1/class/scons.mk
new file mode 100644
index 0000000..1d99ffa
--- /dev/null
+++ b/debian/cdbs/1/class/scons.mk
@@ -0,0 +1,70 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2005 Matthew A. Nicholson <matt at matt-land.com>
+# Description: Builds and cleans packages which have a SConstruct file
+#
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+
+ifndef _cdbs_bootstrap
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+endif
+
+ifndef _cdbs_class_scons
+_cdbs_class_scons := 1
+
+include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+#include $(_cdbs_class_path)/scons-vars.mk$(_cdbs_makefile_suffix)
+include debian/cdbs/1/class/scons-vars.mk$(_cdbs_makefile_suffix)
+
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), scons
+
+DEB_PHONY_RULES += scons-clean
+
+common-build-arch common-build-indep:: debian/stamp-scons-build
+debian/stamp-scons-build:
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_BUILD_TARGET) $(DEB_SCONS_OPTIONS) $(DEB_SCONS_BUILD_OPTIONS)
+	touch debian/stamp-scons-build
+
+clean:: scons-clean
+scons-clean::
+	$(DEB_SCONS_INVOKE) $(DEB_SCONS_CLEAN_TARGET) $(DEB_SCONS_OPTIONS) --keep-going --clean || true
+	rm -f debian/stamp-scons-build
+	rm -rf .sconf_temp/
+	rm -f .sconsign.dblite config.log
+
+common-install-arch common-install-indep:: common-install-impl
+common-install-impl::
+	@if test -n "$(DEB_SCONS_INSTALL_TARGET)"; then \
+	  echo $(DEB_SCONS_INVOKE) $(DEB_SCONS_INSTALL_TARGET) $(DEB_SCONS_OPTIONS) $(DEB_SCONS_INSTALL_OPTIONS); \
+	  $(DEB_SCONS_INVOKE) $(DEB_SCONS_INSTALL_TARGET) $(DEB_SCONS_OPTIONS) $(DEB_SCONS_INSTALL_OPTIONS); \
+	else \
+	  echo "DEB_SCONS_INSTALL_TARGET unset, skipping default scons.mk common-install target"; \
+	fi
+
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+common-post-build-arch common-post-build-indep:: common-post-build-impl
+common-post-build-impl::
+	@if test -n "$(DEB_SCONS_CHECK_TARGET)"; then \
+	  echo $(DEB_SCONS_INVOKE) $(DEB_SCONS_CHECK_TARGET); \
+	  $(DEB_SCONS_INVOKE) $(DEB_SCONS_CHECK_TARGET) $(DEB_SCONS_OPTIONS); \
+	else \
+	   echo "DEB_SCONS_CHECK_TARGET unset, not running checks"; \
+	fi
+endif
+
+endif
diff --git a/debian/rules b/debian/rules
index 574ad7b..7355832 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,11 +7,20 @@ ifneq (,$(DEB_MAINTAINER_MODE))
 endif
 include debian/cdbs/1/rules/upstream-tarball.mk
 include debian/cdbs/1/rules/copyright-check.mk
-include /usr/share/cdbs/1/class/autotools.mk
+include debian/cdbs/1/class/scons.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include debian/cdbs/1/rules/buildinfo.mk
 
 DEB_UPSTREAM_URL = http://downloads.sourceforge.net/hydrogen
 
+DEB_SCONS_OPTIONS = libarchive=1 portaudio=1 portmidi=1 lash=1 prefix=/usr
+DEB_SCONS_OPTIONS += optflags="$(CXXFLAGS)"
+
+DEB_SCONS_INSTALL_OPTIONS = DESTDIR=$(DEB_DESTDIR)
+
+clean::
+	rm -f qt4.pyc version.cpp config.h scache.conf
+	rm -rf scons_cache
+
 # Resolve, cleanup and apply CDBS-declared dependencies
 include debian/cdbs/1/rules/package-relations.mk

-- 
hydrogen packaging



More information about the pkg-multimedia-commits mailing list