%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %{!?python_siteinc: %define python_siteinc %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc()")} Name: quickfix Version: 1.13.3 Release: 1%{?dist} Summary: Open Source FIX Engine Group: Development/Libraries License: ASL 1.1 and BSD with advertising URL: http://www.quickfixengine.org/ Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch1: quickfix-pkgconfig-libdir.patch Patch2: quickfix-autotools-rebootstap.patch Patch3: quickfix-config.h-Makefile.patch Patch4: quickfix-python-and-ruby-Makefile.patch Patch5: quickfix-examples-Makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libxml2-devel BuildRequires: zlib-devel BuildRequires: boost-devel BuildRequires: swig BuildRequires: python2-devel >= 2.4 %description QuickFIX is a full-featured, open source FIX engine, currently compatible with the FIX 4.0-5.0 spec. It runs on Windows, Linux, Solaris, FreeBSD and Mac OS X. APIs are available for C++ and Python. %prep %setup -q -n quickfix # from https://fedoraproject.org/wiki/Packaging:Java find -name '*.class' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; %patch1 -p1 sed -i.flags -e 's|-O0 -g||' src/C++/test/Makefile.in %patch2 -p1 %patch3 -p1 %patch4 -p1 chmod a+x config/py-compile %patch5 -p1 %build %configure --enable-shared --with-python=%{python_siteinc} #from https://fedoraproject.org/wiki/RPath_Packaging_Draft 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} #TODO: invoke ant a la https://fedoraproject.org/wiki/Packaging:Java %install rm -rf $RPM_BUILD_ROOT #This package's Makefile does NOT support make DESTDIR %makeinstall # FIXME: consider automake's include_HEADERS variable instead of this mv $RPM_BUILD_ROOT/usr/include/quickfix/config.h $RPM_BUILD_ROOT/usr/include/quickfix/quickfix-config.h sed -i 's/config.h/quickfix-config.h/g' $RPM_BUILD_ROOT/usr/include/quickfix/Utility.h %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %exclude %{_libdir}/*.la %{_libdir}/libquickfix.so.14.0.0 %{_libdir}/libquickfix.so.14 %doc AUTHORS CONTRIBUTORS LICENSE NEWS THANKS %package devel Summary: Header files and libraries for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release},pkgconfig,libxml2-devel,boost-devel %description devel This package contains the header files and static libraries for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel %files devel %defattr(-,root,root,-) %{_includedir}/quickfix %{_libdir}/libquickfix.so %{_libdir}/pkgconfig/quickfix.pc %{_datadir}/%{name}/ %doc AUTHORS CONTRIBUTORS LICENSE NEWS THANKS %package examples Summary: Example programs for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description examples This package contains the example servers and clients for %{name}. If you would like to run the examples published by the developers of %{name}, install %{name}-examples. %files examples %defattr(-, root, root) %{_bindir}/quickfix-executor %{_bindir}/quickfix-ordermatch %{_bindir}/quickfix-tradeclient %package python Summary: Python binding for %{name} Group: Development/Languages Requires: %{name} = %{version}-%{release} %description python Python binding for %{name} %files python %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING NEWS README %{python_sitearch}/ %changelog * Thu May 13 2010 Martin Dengler - 1.13.3-1 - Update to 1.13.3 - Added python, examples package builds - Appease rpmlint with minor specfile changes * Sun Jul 26 2009 Fedora Release Engineering - 1.12.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Mar 05 2009 Caolán McNamara - 1.12.4-8 - include cstdio for std::sprintf, etc. * Wed Feb 25 2009 Fedora Release Engineering - 1.12.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 09 2008 Hayden James - 1.12.4-6 - Added boost-devel dependency for quickfix-devel package. Renamed config.h to quickfix-config.h. - Removed debug flags from build * Sat Nov 09 2008 Hayden James - 1.12.4-5 - Removed libtool generated file. Added boost-devel and pkgconfig dependency * Sat Nov 08 2008 Hayden James - 1.12.4-4 - Changed license to ASL 1.1 and BSD with advertising. Improved spec file to better conform * Sat Nov 07 2008 Hayden James - 1.12.4-3 - Changed license to ASL 1.1 * Sat Nov 03 2008 Hayden James - 1.12.4-2 - Changed license to BSD * Thu Oct 30 2008 Hayden James - 1.12.4-1 - Initial package.