[QuantLib/f18] rework man3 handling again
Tom Callaway
spot at fedoraproject.org
Wed Aug 8 14:57:15 UTC 2012
commit 5bfae2db70732826465c11d9afa5c776297b429f
Author: Tom Callaway <spot at fedoraproject.org>
Date: Wed Aug 8 10:57:34 2012 -0400
rework man3 handling again
QuantLib.spec | 41 ++++++++++++++++++++++-------------------
1 files changed, 22 insertions(+), 19 deletions(-)
---
diff --git a/QuantLib.spec b/QuantLib.spec
index 45e44d6..1fd8cfd 100644
--- a/QuantLib.spec
+++ b/QuantLib.spec
@@ -61,40 +61,43 @@ mkdir -p %{buildroot}%{docdir}
#cp -p Docs/latex/refman.ps %{buildroot}%{docdir}/QuantLib-%{version}-docs-refman.ps
mkdir -p %{buildroot}%{_mandir}/man1/
cp -p man/*.1 %{buildroot}%{_mandir}/man1/
-pushd Docs/man
-cp -a man3 %{buildroot}%{_mandir}
-popd
rm -rf %{buildroot}/%{_libdir}/*.la
rm -rf %{buildroot}/%{_libdir}/*.a
+
+pushd Docs/man
# So many of the names in the Quantlib manpages are generic, so we rename them to avoid conflicts.
for i in history format gamma manips engines rate floor group license todo error deprecated attachment description domain.hpp method next value; do
- if [ -f $i.3 ]; then
- mv %{buildroot}%{_mandir}/man3/$i.3 %{buildroot}%{_mandir}/man3/ql-$i.3
+ if [ -f man3/$i.3 ]; then
+ mv man3/$i.3 man3/ql-$i.3
else
- echo "$i.3 not found in %{buildroot}%{_mandir}/man3/"
+ echo "$i.3 not found in man3/"
fi
done
# Get rid of spaces in man page names
-mv "%{buildroot}%{_mandir}/man3/Singleton_ ExchangeRateManager _.3" %{buildroot}/%{_mandir}/man3/Singleton_ExchangeRateManager.3
-mv "%{buildroot}%{_mandir}/man3/Singleton_ IndexManager _.3" %{buildroot}/%{_mandir}/man3/Singleton_IndexManager.3
-mv "%{buildroot}%{_mandir}/man3/operator Leg.3" %{buildroot}/%{_mandir}/man3/operator_Leg.3
-mv "%{buildroot}%{_mandir}/man3/Singleton_ CommoditySettings _.3" %{buildroot}/%{_mandir}/man3/Singleton_CommoditySettings.3
-mv "%{buildroot}%{_mandir}/man3/Singleton_ UnitOfMeasureConversionManager _.3" %{buildroot}/%{_mandir}/man3/Singleton_UnitOfMeasureConversionManager.3
+mv "man3/Singleton_ ExchangeRateManager _.3" man3/Singleton_ExchangeRateManager.3
+mv "man3/Singleton_ IndexManager _.3" man3/Singleton_IndexManager.3
+mv "man3/operator Leg.3" %{buildroot}/%{_mandir}/man3/operator_Leg.3
+mv "man3/Singleton_ CommoditySettings _.3" man3/Singleton_CommoditySettings.3
+mv "man3/Singleton_ UnitOfMeasureConversionManager _.3" man3/Singleton_UnitOfMeasureConversionManager.3
# Fix file encoding
recode()
{
iconv -f "$2" -t utf-8 < "$1" > "${1}_"
mv -f "${1}_" "$1"
}
-recode %{buildroot}%{_mandir}/man3/QuantLib_DKKCurrency.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/QuantLib_SEKCurrency.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/QuantLib_NOKCurrency.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/QuantLib_FIMCurrency.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/QuantLib_Currency.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/ql-group.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/ql-history.3 iso-8859-1
-recode %{buildroot}%{_mandir}/man3/ql-license.3 iso-8859-1
+recode man3/QuantLib_DKKCurrency.3 iso-8859-1
+recode man3/QuantLib_SEKCurrency.3 iso-8859-1
+recode man3/QuantLib_NOKCurrency.3 iso-8859-1
+recode man3/QuantLib_FIMCurrency.3 iso-8859-1
+recode man3/QuantLib_Currency.3 iso-8859-1
+recode man3/ql-group.3 iso-8859-1
+recode man3/ql-history.3 iso-8859-1
+recode man3/ql-license.3 iso-8859-1
+
+mkdir %{buildroot}%{_mandir}/man3
+cp -a man3/* %{buildroot}%{_mandir}/man3/
+popd
# Fix multilib conflicts
touch -r News.txt %{buildroot}%{_bindir}/quantlib-config
More information about the scm-commits
mailing list