rpms/fbreader/devel README.Fedora,1.3,1.4 fbreader.spec,1.20,1.21

Michel Alexandre Salim salimma at fedoraproject.org
Sun Oct 18 02:21:57 UTC 2009


Author: salimma

Update of /cvs/pkgs/rpms/fbreader/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26096/devel

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:57 -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/devel/fbreader.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- fbreader.spec	18 Sep 2009 04:29:53 -0000	1.20
+++ fbreader.spec	18 Oct 2009 02:21:57 -0000	1.21
@@ -1,12 +1,13 @@
 Name:           fbreader
 Version:        0.10.7
-Release:        3%{?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
@@ -19,6 +20,7 @@ BuildRequires:  gtk2-devel fribidi-devel
 BuildRequires:  libjpeg-devel desktop-file-utils
 BuildRequires:  qt4-devel
 
+
 %description
 FBReader is an e-book reader, with the following main features:
 
@@ -44,6 +46,28 @@ 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
@@ -67,7 +91,10 @@ for writing applications with Zlibrary.
 %package -n     zlibrary-ui-gtk
 Summary:        GTK+ interface module for ZLibrary
 Group:          System Environment/Libraries
-Provides:       zlibrary-ui
+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
@@ -76,12 +103,17 @@ desktop Linux, Windows, and different Li
 This package provides a GTK+-based UI for ZLibrary.
 
 
-%package -n     zlibrary-ui-qt4
+%package -n     zlibrary-ui-qt
 Summary:        Qt4 interface module for ZLibrary
 Group:          System Environment/Libraries
-Provides:       zlibrary-ui
+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-qt4
+%description -n zlibrary-ui-qt
 ZLibrary is a cross-platform library to build applications running on
 desktop Linux, Windows, and different Linux-based PDAs.
 
@@ -139,10 +171,39 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
 %{_datadir}/FBReader
 %{_datadir}/applications/fedora-FBReader.desktop
@@ -150,6 +211,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/pixmaps/FBReader
 %{_datadir}/zlibrary
 
+%files gtk
+%files qt
+
 %files -n zlibrary
 %defattr(-,root,root,-)
 %doc fbreader/LICENSE
@@ -169,7 +233,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/zlibrary/ui/zlui-gtk.so
 %{_datadir}/zlibrary/keynames-gtk.xml
 
-%files -n zlibrary-ui-qt4
+%files -n zlibrary-ui-qt
 %defattr(-,root,root,-)
 %{_libdir}/zlibrary/ui/zlui-qt4.so
 %{_datadir}/zlibrary/keynames-qt4.xml
@@ -177,6 +241,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %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)
 




More information about the fedora-extras-commits mailing list