]> git.proxmox.com Git - pve-kernel.git/blobdiff - debian/rules
d/control: automatically replace linux tools maj.min version
[pve-kernel.git] / debian / rules
index 39f5cb52187f0038ed29be8b46a452e7ffc4db8c..96373e5bf1be39fc0b60c8abe6eb2e10f9d01f6b 100755 (executable)
@@ -63,7 +63,7 @@ debian/control: $(wildcard debian/*.in)
        chmod +x debian/${PVE_KERNEL_PKG}.postrm
        chmod +x debian/${PVE_KERNEL_PKG}.postinst
        chmod +x debian/${PVE_HEADER_PKG}.postinst
-       sed -e 's/@KVNAME@/${KVNAME}/g' < debian/control.in > debian/control
+       sed -e 's/@KVNAME@/${KVNAME}/g' -e 's/@KVMAJMIN@/${KERNEL_MAJMIN}/g' < debian/control.in > debian/control
 
 build: .compile_mark .tools_compile_mark .modules_compile_mark
 
@@ -129,8 +129,6 @@ binary: install
        ! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibbfd'
        ! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibcrypto'
        ${MAKE} -C ${KERNEL_SRC}/tools/perf man
-       # contained in linux-base
-       rm -f ${KERNEL_SRC}/tools/perf/Documentation/perf.1
        touch $@
 
 .tools_install_mark: .tools_compile_mark
@@ -138,7 +136,10 @@ binary: install
        mkdir -p debian/${LINUX_TOOLS_PKG}/usr/bin
        mkdir -p debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
        install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_$(KERNEL_MAJMIN)
-       install -m644 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/Documentation/*.1 debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
+       for i in ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/Documentation/*.1; do \
+           fname="$${i##*/}"; manname="$${fname%.1}"; \
+           install -m644 "$$i" "debian/${LINUX_TOOLS_PKG}/usr/share/man/man1/$${manname}_$(KERNEL_MAJMIN).1"; \
+       done
        touch $@
 
 .headers_install_mark: .compile_mark .modules_compile_mark