summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-08-07 16:04:24 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-08-07 16:04:24 +0000
commitc053a7c733728cc1e06c8d5894370204ca3a1d19 (patch)
tree7e1e5fbfae9c4fe0213d144019529b1cfe893106
parent106e6fcc00647566998a4224a307d9a453a9db30 (diff)
downloadmultiarch-utils-c053a7c733728cc1e06c8d5894370204ca3a1d19.tar
multiarch-utils-c053a7c733728cc1e06c8d5894370204ca3a1d19.tar.gz
multiarch-utils-c053a7c733728cc1e06c8d5894370204ca3a1d19.tar.bz2
multiarch-utils-c053a7c733728cc1e06c8d5894370204ca3a1d19.tar.xz
multiarch-utils-c053a7c733728cc1e06c8d5894370204ca3a1d19.zip
adapt for rpm4.4 glob /etc/rpm/macros.d/*.macros
-rw-r--r--Makefile8
-rw-r--r--multiarch-utils.spec10
2 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 516b6f0..8da6736 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ prefix = /usr
bindir = $(prefix)/bin
includedir = $(prefix)/include
-RPM_MACRO_FILES = macros.multiarch
+RPM_MACRO_FILES = multiarch
RPM_BIN_FILES = mkmultiarch check-multiarch-files
BINARIES = multiarch-platform multiarch-dispatch
INCLUDES = multiarch-dispatch.h
@@ -35,7 +35,11 @@ clean: cleandist
install:
-mkdir -p $(DESTDIR)/etc/rpm
for f in $(RPM_MACRO_FILES); do \
- perl -pe 's/%MULTIARCH_DISTRO%/$(MULTIARCH_DIST)/' $$f > $(DESTDIR)/etc/rpm/$$f; \
+ perl -pe 's/%MULTIARCH_DISTRO%/$(MULTIARCH_DIST)/' $$f > $(DESTDIR)/etc/rpm/macros.$$f; \
+ if [[ -f /etc/rpm/macros.d/mandriva-release.macros ]]; then \
+ mkdir -p $(DESTDIR)/etc/rpm/macros.d; \
+ mv $(DESTDIR)/etc/rpm/macros.$$f $(DESTDIR)/etc/rpm/macros.d/$$f.macros; \
+ fi; \
done
-mkdir -p $(DESTDIR)$(prefix)/lib/rpm
install -m755 $(RPM_BIN_FILES) $(DESTDIR)$(prefix)/lib/rpm/
diff --git a/multiarch-utils.spec b/multiarch-utils.spec
index 920542a..98e22c9 100644
--- a/multiarch-utils.spec
+++ b/multiarch-utils.spec
@@ -10,12 +10,18 @@ Release: %{release}
Source0: %{name}-%{version}.tar.bz2
License: GPL
Group: Development/Other
-Url: http://www.mandrakelinux.com/
+Url: http://www.mandrivalinux.com/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{mdkversion} >= %{multiarch_distro}
Conflicts: rpm < 4.2.3-6mdk
%endif
+%if %{mdkversion} >= 200600
+Conflicts: rpm < 4.4
+%define macros %{_sysconfdir}/rpm/macros.d/multiarch.macros
+%else
+%define macros %{_sysconfdir}/rpm/macros.multiarch
+%endif
%description
multiarch-utils is a collection of helper utilities to dispatch
@@ -40,7 +46,7 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/multiarch-platform
%{_bindir}/multiarch-dispatch
%{_includedir}/multiarch-dispatch.h
-%{_sysconfdir}/rpm/macros.multiarch
+%{macros}
%{_prefix}/lib/rpm/mkmultiarch
%{_prefix}/lib/rpm/check-multiarch-files
%{_prefix}/X11R6/lib/X11/config/multiarch-dispatch-host.def