From 86b206c2cf5c692a32a55696c952eed4127d3b9d Mon Sep 17 00:00:00 2001
From: Hans-Christoph Steiner <eighthave@users.sourceforge.net>
Date: Thu, 12 Jul 2007 14:27:37 +0000
Subject: automatically set the package version and architecture

svn path=/trunk/; revision=8042
---
 packages/linux_make/Makefile       | 7 +++++++
 packages/linux_make/debian/control | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/packages/linux_make/Makefile b/packages/linux_make/Makefile
index f9972ce6..b20aabae 100755
--- a/packages/linux_make/Makefile
+++ b/packages/linux_make/Makefile
@@ -69,6 +69,8 @@ endif
 
 PACKAGE_NAME = Pd-$(PD_VERSION)
 
+DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_PD_VERSION := $(shell echo $(PD_VERSION) | sed 's|\(.*\)-extended-\(.*\)|\1cvs\2-1|')
 deb: $(bindir)
 # GNOME menu support
 	install -d $(DESTDIR)/usr/share/icons/hicolor/128x128/apps
@@ -97,6 +99,11 @@ deb: $(bindir)
 # Pd-related scripts
 	install -p $(scripts_src)/pd-diff $(bindir)
 	install -p $(scripts_src)/config-switcher.sh $(bindir)
+# set build architecture and version for the package
+	sed -i 's|^Version:.*|Version: $(DEB_PD_VERSION)|' \
+		$(packages_src)/linux_make/debian/control
+	sed -i 's|^Architecture:.*|Architecture: $(DEB_BUILD_ARCH)|' \
+		$(packages_src)/linux_make/debian/control
 # debian packaging
 	test -d $(DESTDIR)/DEBIAN || mkdir -p $(DESTDIR)/DEBIAN
 	cp $(packages_src)/linux_make/debian/control $(DESTDIR)/DEBIAN
diff --git a/packages/linux_make/debian/control b/packages/linux_make/debian/control
index 6bc2466e..7b0cef07 100644
--- a/packages/linux_make/debian/control
+++ b/packages/linux_make/debian/control
@@ -1,10 +1,10 @@
 Package: pd-extended
-Version: 0.40.2cvs20070709-1 
+Version: 0.40.2cvs20070712-1
 Section: sound
 Priority: optional
-Architecture: any
+Architecture: i386
 Depends: libjack0.100.0-0, ttf-bitstream-vera, tcl8.4 (>= 8.4.1-0), tk8.4 (>= 8.4.1-0), libasound2, libogg0, libvorbis0a, libvorbisenc2, libvorbisfile3, libspeex1, libflac7, libsndfile1, libpcre3, libtheora0, imagemagick, liblcms1, libpng3, libtiff4, libmpeg1, libmpeg2-4, libmpeg3-1, libquicktime0, libx11-6, libdv4, libxv1, libimlib2, libfreetype6, libsm6, libxml2, libxext6, libxt6, libglu1-mesa, libgsl0, libmagick++9c2a, x-ttcidfont-conf
-Recommends: liblo0, liblame0
+Recommends: liblo0, liblame0, qjackctl
 Suggests: xmms
 Maintainer: Hans-Christoph Steiner <hans@at.or.at>
 Description: Pure Data with patches and a large collection of externals
-- 
cgit v1.2.1