diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | multiarch-utils.spec | 10 |
2 files changed, 14 insertions, 4 deletions
@@ -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 |