%define docdir %{_datadir}/doc/QuantLib-%{version} Name: QuantLib Version: 0.9.9 Release: 1%{?dist} Summary: A software framework for quantitative finance License: BSD Group: System Environment/Libraries URL: http://www.quantlib.org Source0: http://download.sourceforge.net/quantlib/QuantLib-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: boost-devel, tetex, tetex-latex, tetex-dvips, emacs, texlive-utils %description QuantLib is a free/open-source library for modeling, trading, and risk management in real-life. %package devel Summary: QuantLib development files Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Static libraries and headers for QuantLib. %package test Summary: The test-suite to check the setup of QuantLib Group: Development/Tools Requires: %{name} = %{version}-%{release} %description test The QuantLib-test-suite will validate the compiled code against pre-constructed test cases, and helps in validating the library. %package doc Summary: The documentation for QuantLib Group: Documentation Requires: %{name} = %{version} BuildRequires: doxygen >= 1.3, graphviz %description doc This package contains documentation files generated from the source code of QuantLib. %prep %setup -q %build %configure CFLAGS="$RPM_OPT_FLAGS -fpermissive" CPPFLAGS="$RPM_OPT_FLAGS -fpermissive" # Get rid of RPATH sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} make %{?_smp_mflags} docs-man # pdf and ps file creation process breaks tetex # make pdf-local ps-local %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/%{docdir} #cp -p Docs/latex/refman.pdf $RPM_BUILD_ROOT/%{docdir}/QuantLib-%{version}-docs-refman.pdf #cp -p Docs/latex/refman.ps $RPM_BUILD_ROOT/%{docdir}/QuantLib-%{version}-docs-refman.ps mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ cp -p man/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/ cp -pr Docs/man/man3 $RPM_BUILD_ROOT/%{_mandir}/ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.a # generic names already used by other packages mv $RPM_BUILD_ROOT/%{_mandir}/man3/Constraint.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-Constraint.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/history.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-history.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/format.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-format.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/gamma.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-gamma.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/manips.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-manips.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/engines.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-engines.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/rate.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-rate.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/floor.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-floor.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/group.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-group.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/license.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-license.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/todo.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-todo.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/error.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-error.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/y0.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-y0.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/end.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-end.3 mv $RPM_BUILD_ROOT/%{_mandir}/man3/deprecated.3 $RPM_BUILD_ROOT/%{_mandir}/man3/ql-deprecated.3 # Get rid of spaces in man page names mv "$RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_ ExchangeRateManager _.3" $RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_ExchangeRateManager.3 mv "$RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_ IndexManager _.3" $RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_IndexManager.3 mv "$RPM_BUILD_ROOT/%{_mandir}/man3/operator Leg.3" $RPM_BUILD_ROOT/%{_mandir}/man3/operator_Leg.3 mv "$RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_ Settings _.3" $RPM_BUILD_ROOT/%{_mandir}/man3/Singleton_Settings.3 # Fix file encoding recode() { iconv -f "$2" -t utf-8 < "$1" > "${1}_" mv -f "${1}_" "$1" } recode $RPM_BUILD_ROOT%{_mandir}/man3/QuantLib_DKKCurrency.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/QuantLib_SEKCurrency.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/QuantLib_NOKCurrency.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/QuantLib_FIMCurrency.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/QuantLib_Currency.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/ql-group.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/ql-history.3 iso-8859-1 recode $RPM_BUILD_ROOT%{_mandir}/man3/ql-license.3 iso-8859-1 # Fix multilib conflicts touch -r News.txt $RPM_BUILD_ROOT%{_bindir}/quantlib-config touch -r News.txt $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/quantlib.elc %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc LICENSE.TXT %{_libdir}/libQuantLib-*.so %files devel %defattr(-,root,root) %{_includedir}/ql/ %{_libdir}/libQuantLib.so %{_bindir}/quantlib-config %{_mandir}/man1/quantlib-config.* %{_mandir}/man1/quantlib-benchmark.* %{_datadir}/aclocal/quantlib.m4 %{_datadir}/emacs/site-lisp/* %files test %defattr(-,root,root) %{_bindir}/quantlib-test-suite %{_mandir}/man1/quantlib-test-suite.* %files doc %defattr(-,root,root) %doc Authors.txt ChangeLog.txt Readme.txt News.txt Contributors.txt %{_mandir}/man3/* %{_mandir}/man1/Bonds.* %{_mandir}/man1/BermudanSwaption.* %{_mandir}/man1/CallableBonds.* %{_mandir}/man1/CDS.* %{_mandir}/man1/ConvertibleBonds.* %{_mandir}/man1/DiscreteHedging.* %{_mandir}/man1/EquityOption.* %{_mandir}/man1/FittedBondCurve.* %{_mandir}/man1/FRA.* %{_mandir}/man1/Replication.* %{_mandir}/man1/Repo.* %{_mandir}/man1/SwapValuation.* #%{docdir}/QuantLib-%{version}-docs-refman.pdf #%{docdir}/QuantLib-%{version}-docs-refman.ps %changelog * Wed Jan 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9.9-1 - update to 0.9.9 - don't package static libs (resolves 556035) * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Dec 17 2008 Benjamin Kosnik <bkoz@redhat.com> - 0.9.7-4 - Rebuild for boost-1.37.0. * Mon Nov 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.7-3 - rename conflicting man pages (bz 472615) * Thu Nov 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.7-2 - missing man pages * Thu Nov 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.7-1 - update to 0.9.7 * Mon Mar 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-5 - no operator _.3 man page in 0.9.0 * Mon Mar 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-4 - fix file conflicts with poorly named manpages (bz 437616) * Wed Feb 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-3 - FittedBondCurve manpage * Wed Feb 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-2 - build fixes * Wed Feb 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-1 - bump to 0.9.0 * Mon Oct 29 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.8.1-4 - fix more conflicting manpages (bz 322201) - fix multilib conflict (bz 343041) * Thu Sep 20 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.8.1-3 - another conflicting man page (resolves bugzilla 297161) * Sun Aug 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.8.1-2 - rebuild for BuildID * Mon Aug 6 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.8.1-1.1 - rebuild for new boost in rawhide * Tue Jul 10 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.8.1-1 - bump to 0.8.1 * Thu Jan 18 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.14-2 - namespace conflicts resolved (210206) * Fri Jan 5 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.14-1 - bump to 0.3.14 - patch0 is obsolete - fix more namespace conflicts * Fri Sep 15 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.13-4 - adjust for new man pages * Fri Sep 15 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.13-3 - fix missing sources * Fri Sep 15 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.13-2 - fc6 bump * Tue Aug 22 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.13-1 - bump to 0.3.13 * Thu Apr 6 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.12-1 - bump to 0.3.12, resolve bz 182228, bz 181867 * Tue Feb 28 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-4 - bump for FC-5 * Fri Nov 18 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-3 - use -fpermissive to deal with icky c++ code * Thu Nov 17 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-2 - fix patch * Wed Nov 16 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-1 - bump for new release * Fri Jul 29 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.10-1 - Bump for new release * Sat Jun 25 2005 Colin Charles <colin@fedoraproject.org> 0.3.9-2 - Fix download URL * Fri Jun 3 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.9-1 - cleanup spec - add emacs,xemacs BuildRequires - bump to 0.3.9 * Tue May 10 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-7 - fix QuantLib-0.3.8-installdatahookfix.patch * Sat Apr 16 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-6 - add tetex BuildRequires * Fri Apr 15 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-5 - minor spec cleanups * Thu Apr 14 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-4 - bump number because of cvs issues * Mon Apr 11 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-3 - Cleanup docs handling * Sat Apr 2 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-2 - add $(DESTDIR) to make install-data-hook - rename two man pages due to generic name conflicts * Fri Apr 1 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-1 - inital package for Fedora Extras