From 989cd53bd519eed9519ae614ccffa543c0563cc5ccffbe9f096d6d67876a34ab Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 20 Mar 2018 09:27:04 +0000 Subject: [PATCH] - Install license - replace_manpage_with_links.sh: replace named links with symlinks and stop using fdupes as it just linked linked manpages OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/neon?expand=0&rev=43 --- neon.changes | 7 +++++++ neon.spec | 5 +++-- replace_manpage_with_links.sh | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 replace_manpage_with_links.sh diff --git a/neon.changes b/neon.changes index c4adeb9..b4028d8 100644 --- a/neon.changes +++ b/neon.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 20 08:41:59 UTC 2018 - adam.majer@suse.de + +- Install license +- replace_manpage_with_links.sh: replace named links with symlinks + and stop using fdupes as it just linked linked manpages + ------------------------------------------------------------------- Mon Mar 19 13:46:17 UTC 2018 - marco.strigl@suse.com diff --git a/neon.spec b/neon.spec index 56856b5..4bc6a42 100644 --- a/neon.spec +++ b/neon.spec @@ -27,10 +27,10 @@ Source0: http://www.webdav.org/neon/neon-%{version}.tar.gz Source1: http://www.webdav.org/neon/neon-%{version}.tar.gz.asc Source2: %{name}.keyring Source3: baselibs.conf +Source10: replace_manpage_with_links.sh # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/Packaging/Patches Patch0: %{name}-0.28.4-bloat.patch Patch1: fix_timeout_tests_for_ppc64le.patch -BuildRequires: fdupes BuildRequires: krb5-devel BuildRequires: libexpat-devel BuildRequires: libopenssl-devel @@ -91,7 +91,7 @@ make %{?_smp_mflags} %install make DESTDIR=%{buildroot} docdir=%{_defaultdocdir}/%{name} install install-man install-html %{?_smp_mflags} find %{buildroot} -type f -name "*.la" -delete -print -%fdupes -s %{buildroot} +find %{buildroot}%{_mandir} -type f -exec bash %{S:10} {} \; %check make %{?_smp_mflags} check @@ -102,6 +102,7 @@ make %{?_smp_mflags} check %files -n libneon27 %doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO %{_libdir}/*.so.27* +%license src/COPYING.LIB %files -n libneon-devel %doc %{_defaultdocdir}/%{name} diff --git a/replace_manpage_with_links.sh b/replace_manpage_with_links.sh new file mode 100644 index 0000000..3d496cb --- /dev/null +++ b/replace_manpage_with_links.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Is this just a linked manpage? +echo "Processing $1" +grep '^\.so man\([0-7]\?\)/.*\1$' "$1" || exit 0 + +# extract target name +TARGET=`sed -e 's/^\.so man\([0-7]\?\)\///' "$1"` +MANDIR=`dirname "$1"` + +# verify that target exists +[ -e "$MANDIR"/"$TARGET" ] || exit 1 + +# replace manpage reload with symlink +echo " -> $TARGET" +rm "$1" +ln -s $TARGET "$1" +