From 86b206c2cf5c692a32a55696c952eed4127d3b9d Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner 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 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/linux_make/Makefile') 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 -- cgit v1.2.1