linux/debian/patches/tools-perf-version.patch

45 lines
1.6 KiB
Diff
Raw Normal View History

--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -859,7 +859,7 @@
install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'
$(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
@@ -879,7 +879,7 @@
$(MAKE) -C Documentation install
install-man:
- $(MAKE) -C Documentation install-man
+ $(MAKE) -C Documentation install-man VERSION=$(VERSION)
install-html:
$(MAKE) -C Documentation install-html
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -156,13 +156,15 @@
install: install-man
-install-man: man
+install-man: $(addprefix install-man-,$(DOC_MAN1))
+
+install-man-perf.1: perf.1
+ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
+ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1
+
+install-man-perf%.1: perf%.1
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir)
-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
+ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1
install-info: info
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)