rpms/fbreader/F-11 README.Fedora,1.3,1.4 fbreader.spec,1.18,1.19
Michel Alexandre Salim
salimma at fedoraproject.org
Sun Oct 18 02:21:56 UTC 2009
Author: salimma
Update of /cvs/pkgs/rpms/fbreader/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26096/F-11
Modified Files:
fbreader.spec
Added Files:
README.Fedora
Log Message:
* Sat Oct 17 2009 Michel Salim <salimma at fedoraproject.org> - 0.10.7-4
- Provide virtual packages for each available interface
- Use alternatives to select the user interface (see README.Fedora)
Index: README.Fedora
===================================================================
RCS file: README.Fedora
diff -N README.Fedora
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ README.Fedora 18 Oct 2009 02:21:56 -0000 1.4
@@ -0,0 +1,27 @@
+README for Fedora
+-----------------
+
+The previously-monolithic FBReader package has now been split into
+separate subpackages:
+
+- fbreader: The ebook reader
+- zlibrary: Cross-platform GUI library
+- zlibrary-ui-gtk: GTK+ interface for zlibrary
+- zlibrary-ui-qt: Qt interface for zlibrary
+
+Two convenience packages are provided:
+- fbreader-gtk: installs fbreader and zlibrary-ui-gtk
+- fbreader-qt: installs fbreader and zlibrary-ui-qt
+
+'yum install fbreader' does not guarantee which interface gets picked;
+install fbreader-gtk or -qt instead.
+
+If both -gtk and -qt interfaces are installed, by default
+the Gtk+ interface is used. To change the interface you want to use,
+do as root:
+
+# alternatives --config zlibrary-ui
+
+to reset the choice to the default, use
+
+# alternatives --auto zlibrary-ui
Index: fbreader.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fbreader/F-11/fbreader.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- fbreader.spec 31 Mar 2009 23:07:22 -0000 1.18
+++ fbreader.spec 18 Oct 2009 02:21:56 -0000 1.19
@@ -1,13 +1,13 @@
-# rebuild with --with qt4 to build optional qt4 UI
Name: fbreader
Version: 0.10.7
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: E-book reader
Group: Applications/Publishing
License: GPLv2+
URL: http://www.fbreader.org/
Source0: http://www.fbreader.org/fbreader-sources-%{version}.tgz
+Source1: README.Fedora
Patch0: fbreader-0.10.0-desktop-file.patch
Patch1: fbreader-optflags.patch
# Use to expose the compiler flags used during build
@@ -15,11 +15,11 @@ Patch1: fbreader-optflags.patch
Patch3: fbreader-defaults.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: expat-devel bzip2-devel liblinebreak-static
+BuildRequires: expat-devel bzip2-devel liblinebreak-devel
BuildRequires: gtk2-devel fribidi-devel libcurl-devel
BuildRequires: libjpeg-devel desktop-file-utils
-%{?_with_qt4:BuildRequires: qt4-devel}
-#Requires:
+BuildRequires: qt4-devel
+
%description
FBReader is an e-book reader, with the following main features:
@@ -46,6 +46,80 @@ FBReader is an e-book reader, with the f
* Screen rotation by 90, 180 and 270 degrees.
+%package gtk
+Summary: E-book reader (GTK+ interface)
+Group: Applications/Publishing
+Requires: %{name} = %{version}-%{release}
+Requires: zlibrary-ui-gtk = %{version}-%{release}
+
+%description gtk
+A virtual package that bundles both the FBreader e-book reader and its
+GTK+ user interface.
+
+
+%package qt
+Summary: E-book reader (Qt interface)
+Group: Applications/Publishing
+Requires: %{name} = %{version}-%{release}
+Requires: zlibrary-ui-qt = %{version}-%{release}
+
+%description qt
+A virtual package that bundles both the FBreader e-book reader and its
+Qt4 user interface.
+
+
+%package -n zlibrary
+Summary: Cross-platform GUI library
+Group: System Environment/Libraries
+Requires: zlibrary-ui = %{version}-%{release}
+
+%description -n zlibrary
+ZLibrary is a cross-platform library to build applications running on
+desktop Linux, Windows, and different Linux-based PDAs.
+
+
+%package -n zlibrary-devel
+Summary: Development files for zlibrary
+Group: Development/Libraries
+Requires: zlibrary = %{version}-%{release}
+
+%description -n zlibrary-devel
+This package contains the libraries amd header files that are needed
+for writing applications with Zlibrary.
+
+
+%package -n zlibrary-ui-gtk
+Summary: GTK+ interface module for ZLibrary
+Group: System Environment/Libraries
+Provides: zlibrary-ui = %{version}-%{release}
+
+Requires(posttrans): /usr/sbin/alternatives
+Requires(postun): /usr/sbin/alternatives
+
+%description -n zlibrary-ui-gtk
+ZLibrary is a cross-platform library to build applications running on
+desktop Linux, Windows, and different Linux-based PDAs.
+
+This package provides a GTK+-based UI for ZLibrary.
+
+
+%package -n zlibrary-ui-qt
+Summary: Qt4 interface module for ZLibrary
+Group: System Environment/Libraries
+Provides: zlibrary-ui = %{version}-%{release}
+Provides: zlibrary-ui-qt4 = %{version}-%{release}
+Obsoletes: zlibrary-ui-qt4 < %{version}-%{release}
+
+Requires(posttrans): /usr/sbin/alternatives
+Requires(postun): /usr/sbin/alternatives
+
+%description -n zlibrary-ui-qt
+ZLibrary is a cross-platform library to build applications running on
+desktop Linux, Windows, and different Linux-based PDAs.
+
+This package provides a Qt4-based UI for ZLibrary.
+
+
%prep
%setup -q
%patch0 -p1 -b .desktop-file
@@ -61,27 +135,24 @@ make %{?_smp_mflags} -C zlibrary/text TA
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 \
+make -C zlibrary/core do_install do_install_dev \
+ 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 \
+make -C zlibrary/text do_install do_install_dev \
+ 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
@@ -96,26 +167,87 @@ desktop-file-install --vendor="fedora" \
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
+%post -n zlibrary -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%postun -n zlibrary -p /sbin/ldconfig
+%posttrans -n zlibrary-ui-gtk
+alternatives \
+ --install \
+ %{_libdir}/zlibrary/ui/zlui-active.so \
+ zlibrary-ui \
+ %{_libdir}/zlibrary/ui/zlui-gtk.so \
+ 2
+
+%posttrans -n zlibrary-ui-qt
+alternatives \
+ --install \
+ %{_libdir}/zlibrary/ui/zlui-active.so \
+ zlibrary-ui \
+ %{_libdir}/zlibrary/ui/zlui-qt4.so \
+ 1
+
+%postun -n zlibrary-ui-gtk
+if [ $1 -eq 0 ]; then
+ alternatives --remove zlibrary-ui \
+ %{_libdir}/zlibrary/ui/zlui-gtk.so
+fi
+exit 0
+
+%postun -n zlibrary-ui-qt
+if [ $1 -eq 0 ]; then
+ alternatives --remove unison \
+ %{_libdir}/zlibrary/ui/zlui-qt4.so
+fi
+exit 0
%files
%defattr(-,root,root,-)
-%doc fbreader/LICENSE
+%doc fbreader/LICENSE README.Fedora
%{_bindir}/FBReader
-%{_libdir}/lib*.so.*
-%{_libdir}/zlibrary
%{_datadir}/FBReader
%{_datadir}/applications/fedora-FBReader.desktop
%{_datadir}/pixmaps/FBReader.png
%{_datadir}/pixmaps/FBReader
%{_datadir}/zlibrary
+%files gtk
+%files qt
+
+%files -n zlibrary
+%defattr(-,root,root,-)
+%doc fbreader/LICENSE
+%{_libdir}/lib*.so.*
+%dir %{_libdir}/zlibrary
+%dir %{_libdir}/zlibrary/ui
+%exclude %{_datadir}/zlibrary/keynames-*.xml
+%{_datadir}/zlibrary
+
+%files -n zlibrary-devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/lib*.so
+
+%files -n zlibrary-ui-gtk
+%defattr(-,root,root,-)
+%{_libdir}/zlibrary/ui/zlui-gtk.so
+%{_datadir}/zlibrary/keynames-gtk.xml
+
+%files -n zlibrary-ui-qt
+%defattr(-,root,root,-)
+%{_libdir}/zlibrary/ui/zlui-qt4.so
+%{_datadir}/zlibrary/keynames-qt4.xml
+
%changelog
+* Sat Oct 17 2009 Michel Salim <salimma at fedoraproject.org> - 0.10.7-4
+- Provide virtual packages for each available interface
+- Use alternatives to select the user interface (see README.Fedora)
+
+* Thu Sep 17 2009 Michel Salim <salimma at fedoraproject.org> - 0.10.7-3
+- Split out zlibrary and zlibrary-ui subpackages (fixes bz# 523946)
+
* Tue Mar 31 2009 Michel Salim <salimma at fedoraproject.org> - 0.10.7-1
- Update to 0.10.7
More information about the fedora-extras-commits
mailing list