X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=openssl%2Fopenssl.nm;fp=openssl%2Fopenssl.nm;h=c2d3c65d9633fed1ba65dce28081e9912bb1075f;hb=b7234e013e0316148d5250543c1b44ef2fc8969f;hp=7ddb8e1359d51cce4c2fcfce1eb065f3ab6454e2;hpb=0a2f51fba67ac7d4b5ef484a1c129ce220adf5f8;p=ipfire-3.x.git diff --git a/openssl/openssl.nm b/openssl/openssl.nm index 7ddb8e135..c2d3c65d9 100644 --- a/openssl/openssl.nm +++ b/openssl/openssl.nm @@ -4,8 +4,8 @@ ############################################################################### name = openssl -version = 1.0.1h -release = 2 +version = 1.0.2c +release = 1 maintainer = Michael Tremer groups = System/Libraries @@ -118,16 +118,42 @@ build # Rename man pages so that they don't conflict with other system man pages. pushd %{BUILDROOT}%{mandir} - for manpage in man*/*; do - if [ -L ${manpage} ]; then - TARGET=`ls -l ${manpage} | awk '{ print $NF }'` - ln -snf ${TARGET}ssl ${manpage}ssl - rm -f ${manpage} - else - mv ${manpage} ${manpage}ssl - fi + for m in $(find . -type f | xargs grep -L '#include'); do + d="${m%/*}" + d="${d#./}" + m="${m##*/}" + [[ ${m} == openssl.1* ]] && continue + [[ -n "$(find -L "${d}" -type l)" ]] && exit 1 + mv ${d}/{,ssl-}${m} + + # fix up references to renamed man pages + sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' "${d}/ssl-${m}" + ln -s "ssl-${m}" "${d}/openssl-${m}" + + # locate any symlinks that point to this man page ... we assume + # that any broken links are due to the above renaming + for s in $(find -L "${d}" -type l); do + s="${s##*/}" + rm -f "${d}/${s}" + ln -s "ssl-${m}" "${d}/ssl-${s}" + ln -s "ssl-${s}" "${d}/openssl-${s}" + done done + + [[ -n "$(find -L "${d}" -type l)" ]] && exit 1 # "broken manpage links found :(" popd + + #pushd %{BUILDROOT}%{mandir} + #for manpage in man*/*; do + # if [ -L "${manpage}" ]; then + # TARGET="$(ls -l "${manpage}" | awk '{ print $NF }')" + # ln -snf "${TARGET}ssl" "${manpage}ssl" + # rm -f "${manpage}" + # else + # mv "${manpage}" "${manpage}ssl" + # fi + #done + #popd end end