Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > da7d29df0023277c5b2ce1ac3159f29d > files > 3

fbreader-0.99.4-2.mga3.src.rpm

Name:		fbreader
Version:	0.99.4
Release:	%mkrel 2
Summary:	Reader for e-books in various formats
License:	GPLv2
Group:		Office/Utilities
URL:		http://www.fbreader.org
Source:		http://www.fbreader.org/files/desktop/%{name}-sources-%{version}.tgz
Patch2:		fbreader-0.99.4-xdgopen.patch
BuildRequires:	jpeg-devel
BuildRequires:	libstdc++-devel
BuildRequires:	libexpat-devel
BuildRequires:	zlib-devel
BuildRequires:	bzip2-devel
BuildRequires:	linebreak-devel
BuildRequires:	curl-devel
BuildRequires:	fribidi-devel
BuildRequires:	sqlite3-devel
BuildRequires:	qt4-devel
Obsoletes:	%{name}-common < 0.99
Obsoletes:	%{name}-qt4 < 0.99
Obsoletes:	%{name}-gtk < 0.99

%description
FBReader is an e-book reader for various platforms.
Supported formats include: fb2, HTML, chm, plucker, palmdoc, zTxt,
TCR, RTF, OEB, OpenReader, mobipocket, plain text.

%prep
%setup -q
%apply_patches

# fix icon extension in the .desktop file
perl -pi -e 's,FBReader.png,FBReader,' fbreader/desktop/desktop

# fix qt4 build
perl -pi -e 's,moc-qt4,%qt4bin/moc,' makefiles/arch/desktop.mk
perl -pi -e 's,CC = .*,CC = gcc,' makefiles/arch/desktop.mk
perl -pi -e 's,QTINCLUDE = -I /usr/include/qt4,QTINCLUDE = -I %qt4include,' makefiles/arch/desktop.mk
perl -pi -e 's,UILIBS = -lQtGui,UILIBS = -lQtGui -lQtCore,' makefiles/arch/desktop.mk
perl -pi -e 's,-lunibreak,-llinebreak,' makefiles/config.mk zlibrary/text/Makefile

%define _disable_ld_no_undefined 1
echo "CFLAGS = %optflags" >> makefiles/arch/desktop.mk
echo "LDFLAGS = %ldflags" >> makefiles/arch/desktop.mk

%build
make -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir}

make -C zlibrary/text TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir}

make -C zlibrary/ui TARGET_ARCH=desktop UI_TYPE=qt4 \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir}

make -C fbreader TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir}

%install
make -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir} do_install

make -C zlibrary/text TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir} do_install

make -C zlibrary/ui TARGET_ARCH=desktop UI_TYPE=qt4 \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir} do_install

make -C fbreader TARGET_ARCH=desktop UI_TYPE=dummy \
	DESTDIR=%{buildroot} INSTALLDIR=%{_prefix} LIBDIR=%{_libdir} do_install

# add mimetypes
desktop-file-install \
	--vendor="" \
	--add-mime-type="application/epub+zip;application/rtf;" \
	--add-mime-type="application/x-mobipocket-ebook;application/x-fictionbook+xml;" \
	--add-mime-type="text/html;application/xhtml+xml;" \
	%{buildroot}%{_datadir}/applications/FBReader.desktop --dir=%{buildroot}%{_datadir}/applications/

rm -f %{buildroot}%{_libdir}/*.so

%files
%{_bindir}/FBReader
%{_libdir}/*.so.*
%{_datadir}/FBReader
%{_datadir}/pixmaps/*
%{_datadir}/zlibrary
%{_datadir}/applications/*.desktop


%changelog

* Fri Mar 08 2013 fwang <fwang> 0.99.4-2.mga3
+ Revision: 401779
- fix obsoletes

* Mon Mar 04 2013 fwang <fwang> 0.99.4-1.mga3
+ Revision: 401383
- obsolete correct package
- update file list
- update file list
- update file list
- merge all packages into one
- only build qt4 frontend
- use linebreak as what gentoo is doing
- disable undefined
- new version 0.99.4
- update rpm group
- update rpm group
- new version 0.99.2

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + tv <tv>
    - fix group
    - common packages should not provides fbreader

* Thu Apr 14 2011 tv <tv> 0.12.10-5.mga1
+ Revision: 85235
- fix upgrading from MDV

* Wed Mar 02 2011 ahmad <ahmad> 0.12.10-4.mga1
+ Revision: 62619
- add mimetypes to the .desktop files

* Sun Jan 16 2011 ahmad <ahmad> 0.12.10-3.mga1
+ Revision: 19891
- add BR qt4-devel to build the Qt4 GUI
- split gtk and qt4 packages
- fix qt4 includes and build
- add a qt4 .destkop file
- drop patch0 and fix the icon name in the .desktop file with a perl command
- imported package fbreader