From: Elan Ruusamäe Date: Wed, 31 Oct 2007 22:07:54 +0000 (+0000) Subject: - convert symlinks to man links automatically X-Git-Tag: auto/ac/rpm-build-macros-1_402-1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=refs%2Ftags%2Fauto%2Fti%2Frpm-build-macros-1_402-1;p=packages%2Frpm.git - convert symlinks to man links automatically Changed files: rpm.macros -> 1.402 --- 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; \