aboutsummaryrefslogtreecommitdiff
path: root/packages/linux_make/Makefile
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-12 14:27:37 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-12 14:27:37 +0000
commit86b206c2cf5c692a32a55696c952eed4127d3b9d (patch)
tree6a6277b060ebeb8c2b43c13b4a38395ad9f75a70 /packages/linux_make/Makefile
parent71b3e51f234048d12d6677da0025790912ac3633 (diff)
automatically set the package version and architecture
svn path=/trunk/; revision=8042
Diffstat (limited to 'packages/linux_make/Makefile')
-rwxr-xr-xpackages/linux_make/Makefile7
1 files changed, 7 insertions, 0 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