%define oname FlightCrew %define version 0.7.1 %define prerel 0 %define rel 1 %if %prerel %define release %mkrel -c %prerel %rel %define srcname %oname-%version%prerel %else %define release %mkrel %rel %define srcname %oname-%version %endif Summary: A C++, cross-platform, native code epub validator Name: flightcrew Version: %version Release: %release Url: http://code.google.com/p/flightcrew/ Source0: http://flightcrew.googlecode.com/files/%srcname-Code.zip Patch0: flightcrew-0.7.0-use-system-libs-2.patch License: GPLv3 and CC-BY-SA Group: Office BuildRequires: cmake BuildRequires: qt4-devel >= 4:4.6.0 BuildRequires: boost-devel BuildRequires: zlib-devel BuildRequires: libxerces-c-devel %description FlightCrew is a C++, cross-platform, native code epub validator. It is composed of three parts: FlightCrew, the validation library FlightCrew-cli, the command-line front-end to the FlightCrew library FlightCrew-gui, the GUI front-end to the FlightCrew library It was initially created for Sigil, the epub editor. %package common Summary: A C++, cross-platform, native code epub validator Group: Office %description common FlightCrew is a C++, cross-platform, native code epub validator. It is composed of three parts: FlightCrew, the validation library FlightCrew-cli, the command-line front-end to the FlightCrew library FlightCrew-gui, the GUI front-end to the FlightCrew library It was initially created for Sigil, the epub editor. %package cli Summary: command line tool for FlightCrew Group: Office Requires: %{name}-common = %version-%release %description cli FlightCrew is a C++, cross-platform, native code epub validator. This package contains the command line tool for FlightCrew. %package gui Summary: command line tool for FlightCrew Group: Office Requires: %{name}-cli = %version-%release Provides: flightcrew %description gui FlightCrew is a C++, cross-platform, native code epub validator. This package contains the Qt4 graphical front-ed for FlightCrew. %prep %setup -q -n %{oname}-%{version}-Code %patch0 -p1 -b .use-system-libs # fix end of line encoding for the docs: #sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt %build # there are only internal helper libs, and they need to be static as build # fails otherwise (they contain undefined symbols), and making them shared # libs wouldn't make sense anyway (they are not shared by anything else) # - Anssi 06/2010 %cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON %make %check pushd build/bin ./fc_tests popd %install rm -rf %{buildroot} %makeinstall_std -C build %clean rm -rf %{buildroot} %files common %defattr(-,root,root) %doc ChangeLog.txt COPYING.txt %files cli %defattr(-,root,root) %{_bindir}/%{name}-cli %files gui %defattr(-,root,root) %{_bindir}/%{name}-gui %changelog * Thu Jan 27 2011 ahmad <ahmad> 0.7.1-1.mga1 + Revision: 42009 - imported package flightcrew