Blob Blame History Raw
# rebuild with --with qt4 to build optional qt4 UI
Name:           fbreader
Version:        0.10.7
Release:        1%{?dist}
Summary:        E-book reader

Group:          Applications/Publishing
License:        GPLv2+
URL:            http://www.fbreader.org/
Source0:        http://www.fbreader.org/fbreader-sources-%{version}.tgz
Patch0:         fbreader-0.10.0-desktop-file.patch
Patch1:         fbreader-optflags.patch
# Use to expose the compiler flags used during build
# Patch2:         fbreader-debug.patch
Patch3:         fbreader-defaults.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  expat-devel bzip2-devel liblinebreak-static
BuildRequires:  gtk2-devel fribidi-devel libcurl-devel
BuildRequires:  libjpeg-devel desktop-file-utils
%{?_with_qt4:BuildRequires: qt4-devel}
#Requires:       

%description
FBReader is an e-book reader, with the following main features:

* Supports several formats: fb2, HTML, CHM, plucker, Palmdoc, zTxt
  (Weasel), TCR (psion), RTF, OEB, OpenReader, mobipocket, plain text.
* Direct reading from tar, zip, gzip and bzip2 archives. (Multiple
  books in one archive are supported.)
* Automatic library building.
* Automatic encoding detection is supported.
* Automatically generated contents table.
* Embedded images support.
* Footnotes/hyperlinks support.
* Position indicator.
* Keeps the last open book and the last read positions for all opened
  books between runs.
* List of last opened books.
* Automatic hyphenations. Liang's algorithm is used. The same
  algorithm is used in TeX, and TeX hyphenation patterns are used in
  FBReader. Patterns for Czech, English, Esperanto, French, German and
  Russian are included in the current version.
* Text search.
* Full-screen mode.
* Screen rotation by 90, 180 and 270 degrees.


%prep
%setup -q
%patch0 -p1 -b .desktop-file
%patch1 -p0 -b .optflags
#%patch2 -p0 -b .debug
%patch3 -p0 -b .defaults


%build
make %{?_smp_mflags} -C zlibrary/core TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=dummy
make %{?_smp_mflags} -C zlibrary/text TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=dummy
make %{?_smp_mflags} -C zlibrary/ui TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=gtk
#make %{?_smp_mflags} -C zlibrary/ui TARGET_ARCH=desktop UI_TYPE=qt
%if 0%{?_with_qt4:1}
make %{?_smp_mflags} -C zlibrary/ui TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=qt4
%endif
make %{?_smp_mflags} -C fbreader TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=dummy


%install
rm -rf $RPM_BUILD_ROOT
make -C zlibrary/core do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=dummy
make -C zlibrary/text do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=dummy
make -C zlibrary/ui do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=gtk
%if 0%{?_with_qt4:1}
make -C zlibrary/ui do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
     LIBDIR=%{_libdir} UI_TYPE=qt4
%endif
make -C fbreader do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
     UI_TYPE=dummy

desktop-file-install --vendor="fedora" \
                     --remove-category="Application" \
                     --delete-original \
                     --dir=%{buildroot}%{_datadir}/applications \
                     %{buildroot}%{_datadir}/applications/FBReader.desktop


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc fbreader/LICENSE
%{_bindir}/FBReader
%{_libdir}/lib*.so.*
%{_libdir}/zlibrary
%{_datadir}/FBReader
%{_datadir}/applications/fedora-FBReader.desktop
%{_datadir}/pixmaps/FBReader.png
%{_datadir}/pixmaps/FBReader
%{_datadir}/zlibrary



%changelog
* Tue Mar 31 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.7-1
- Update to 0.10.7

* Tue Feb 24 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.3-3
- Fix for GCC 4.4

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Feb  5 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.3-1
- Update to 0.10.3

* Wed Jan 28 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.2-1
- Update to 0.10.2

* Wed Jan 14 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.0-1
- Update to 0.10.0

* Thu Jul 31 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.8.17-1
- Update to 0.8.17

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.8.12-2
- Autorebuild for GCC 4.3

* Sun Jan 20 2008 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.12-1
- Update to 0.8.12

* Mon Jan  7 2008 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.10-1
- Update to 0.8.10
- Remove workaround for PDB issues on x86_64; fixed upstream

* Thu Dec 20 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8a-1
- Update to 0.8.8a
- Workaround for PDB format handler when reading certain files

* Wed Dec 19 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8-2
- Fix inclusion of debug files where libdir=/usr/lib (bz #411891)

* Sun Dec  2 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8-1
- Update to 0.8.8

* Thu Oct 18 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-3
- Generate proper -debuginfo subpackage (bz #329841, Ville Skytta)
- Add README.Fedora detailing zTXT bug on x86_64

* Sat Sep 22 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-2
- Fix vendor tag
- Use compiler flags provided by the system

* Sun Sep 16 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-1
- Initial package