summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-02-24 09:01:36 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-02-24 09:01:36 +0000
commit71afeead9f419f547b81c7440124efe7d27960fe (patch)
treed04745512ee78682c7256030276d967e1163b4aa
parent3b03f12e04e439d21781be8d3b77b87fca08b633 (diff)
downloadmultiarch-utils-71afeead9f419f547b81c7440124efe7d27960fe.tar
multiarch-utils-71afeead9f419f547b81c7440124efe7d27960fe.tar.gz
multiarch-utils-71afeead9f419f547b81c7440124efe7d27960fe.tar.bz2
multiarch-utils-71afeead9f419f547b81c7440124efe7d27960fe.tar.xz
multiarch-utils-71afeead9f419f547b81c7440124efe7d27960fe.zip
multiarch_distro is defined in the Makefile
-rw-r--r--Makefile5
-rw-r--r--macros.multiarch2
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 94b9c30..516b6f0 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ PACKAGE = multiarch-utils
VERSION := $(shell rpm -q --qf %{VERSION} --specfile $(PACKAGE).spec)
RELEASE := $(shell rpm -q --qf %{RELEASE} --specfile $(PACKAGE).spec)
TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
+MULTIARCH_DIST := $(shell sed -n '/^%define *multiarch_distro *\([0-9]*\)/s//\1/p' $(PACKAGE).spec)
RPMOPT = --clean --rmspec
@@ -33,7 +34,9 @@ clean: cleandist
install:
-mkdir -p $(DESTDIR)/etc/rpm
- install -m644 $(RPM_MACRO_FILES) $(DESTDIR)/etc/rpm/
+ for f in $(RPM_MACRO_FILES); do \
+ perl -pe 's/%MULTIARCH_DISTRO%/$(MULTIARCH_DIST)/' $$f > $(DESTDIR)/etc/rpm/$$f; \
+ done
-mkdir -p $(DESTDIR)$(prefix)/lib/rpm
install -m755 $(RPM_BIN_FILES) $(DESTDIR)$(prefix)/lib/rpm/
-mkdir -p $(DESTDIR)$(bindir)
diff --git a/macros.multiarch b/macros.multiarch
index 45fc69e..8cad465 100644
--- a/macros.multiarch
+++ b/macros.multiarch
@@ -4,7 +4,7 @@
%multiarch_x11bindir %{_prefix}/X11R6/bin/%{multiarch_platform}
%multiarch_x11includedir %{_prefix}/X11R6/include/%{multiarch_platform}
-%multiarch_distro 1020
+%multiarch_distro %MULTIARCH_DISTRO%
%multiarch_binaries() \
%if %{mdkversion} >= %{multiarch_distro} \