summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 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/