From 38e531f00134c205b4caee145184b4f67c2ed713 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 31 Oct 2007 22:07:54 +0000 Subject: [PATCH] - convert symlinks to man links automatically Changed files: rpm.macros -> 1.402 --- rpm.macros | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpm.macros b/rpm.macros index f4878f5..5bafd76 100644 --- a/rpm.macros +++ b/rpm.macros @@ -347,6 +347,12 @@ unset DISPLAY ||:\ echo "Compress man pages: $i"; \ find "$RPM_BUILD_ROOT$i" -name '*.bz2' -print | xargs -r %{__bzip2} -df; \ find "$RPM_BUILD_ROOT$i" -name '*.gz' -print | xargs -r %{__gzip} -dnf; \ + find $RPM_BUILD_ROOT$i -type l | while read a; do \ + m=$(readlink $a); \ + rm -f $a; \ + echo .so ${m##*/} > $a; \ + echo >&2 "Converted ${a#$RPM_BUILD_ROOT} from symlink to man link: ${m##*/}"; \ + done; \ find "$RPM_BUILD_ROOT$i" -type f -size +%{_min_compress_bytes}c -print | xargs -r %{__gzip} -9nf; \ fi; \ done; \ -- 2.44.0