mcepl pushed to xiphos (epel7). "Updated to new upstream release"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sun Apr 19 19:08:31 UTC 2015
>From 88a8ddd072cadad409b548e5d42ccdd3a76b0b4e Mon Sep 17 00:00:00 2001
From: Greg Hellings <greg.hellings at gmail.com>
Date: Tue, 9 Dec 2014 23:58:57 -0600
Subject: Updated to new upstream release
diff --git a/.gitignore b/.gitignore
index f41c7a0..b2d62e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ xiphos-3.1.3.tar.gz
/xiphos-3.2.0.tar.gz
/xiphos-3.2.1.tar.gz
/xiphos-3.2.2.tar.gz
+/xiphos-3.2.3j.tar.gz
diff --git a/sources b/sources
index 87a4455..67d2cde 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9aaca7380b1537d2b0e6bcc0ab758663 xiphos-3.2.2.tar.gz
+cd2a2c944d63d7cd1888e6f11ef20aa3 xiphos-3.2.3j.tar.gz
diff --git a/xiphos.spec b/xiphos.spec
index 4f346e8..c563adc 100644
--- a/xiphos.spec
+++ b/xiphos.spec
@@ -1,6 +1,13 @@
+# Define whether or not we are building for GTK3
+%if 0%{?rhel} > 0 && 0%{?rhel} <= 6
+%define build3 0
+%else
+%define build3 1
+%endif
+
Name: xiphos
-Version: 3.2.2
-Release: 2%{?dist}
+Version: 3.2.3j
+Release: 1%{?dist}
Summary: Bible study and research tool
License: GPLv2+
URL: http://xiphos.org/
@@ -12,21 +19,16 @@ BuildRequires: docbook-utils
BuildRequires: GConf2-devel
BuildRequires: gettext
BuildRequires: gnome-doc-utils
-%if 0%{?rhel} > 0 && 0%{?rhel} <= 6
BuildRequires: libglade2-devel
-%else
-BuildRequires: gtk3-devel
-%endif
BuildRequires: gtkhtml3-devel
BuildRequires: intltool
BuildRequires: libgsf-devel
BuildRequires: libuuid-devel
-#BuildRequires: perl(XML::Parser)
BuildRequires: rarian-compat
BuildRequires: sword-devel >= 1.7.3
-%if 0%{?rhel} > 0 && 0%{?rhel} <= 6
BuildRequires: webkitgtk-devel
-%else
+%if 0%{build3} > 0
+BuildRequires: gtk3-devel
BuildRequires: webkitgtk3-devel
%endif
Requires: yelp
@@ -39,6 +41,37 @@ UNIX, and Windows under the GNOME toolkit, offering a rich and featureful
environment for reading, study, and research using modules from The SWORD
Project and elsewhere.
+%package gtk2
+Requires: %{name}-common = %{version}-%{release}
+Summary: A version of Xiphos built against the GTK2 toolkit
+
+%description gtk2
+Xiphos (formerly known as GnomeSword) is a Bible study tool written for Linux,
+UNIX, and Windows under the GNOME toolkit, offering a rich and featureful
+environment for reading, study, and research using modules from The SWORD
+Project and elsewhere.
+
+%if 0%{build3} > 0
+%package gtk3
+Requires: %{name}-common = %{version}-%{release}
+Summary: A version of Xiphos built against the GTK3 toolkit
+
+%description gtk3
+Xiphos (formerly known as GnomeSword) is a Bible study tool written for Linux,
+UNIX, and Windows under the GNOME toolkit, offering a rich and featureful
+environment for reading, study, and research using modules from The SWORD
+Project and elsewhere.
+%endif
+
+%package common
+Summary: Common files for all versions of Xiphos
+
+%description common
+Xiphos (formerly known as GnomeSword) is a Bible study tool written for Linux,
+UNIX, and Windows under the GNOME toolkit, offering a rich and featureful
+environment for reading, study, and research using modules from The SWORD
+Project and elsewhere.
+
%prep
%setup -q
rm -rf src/biblesync
@@ -53,20 +86,42 @@ CXXFLAGS='%{optflags} -DNO_SWORD_SET_RENDER_NOTE_NUMBERS=1'
export CXXFLAGS
export CFLAGS
+# Build GTK2 version
LDFLAGS='%{?__global_ldflags}' \
./waf configure \
--prefix=%{_prefix} \
-%if 0%{?rhel} > 0 && 0%{?rhel} <= 6
--gtk=2 \
-%else
- --gtk=3 \
-%endif
+ -b build-gtk2 \
+ --enable-webkit || cat build/config.log
+
+./waf build -v -b build-gtk2
+
+# Build GTK3 version
+%if 0%{build3} > 0
+LDFLAGS='%{?__global_ldflags}' \
+./waf configure \
+ --prefix=%{_prefix} \
+ --gtk=3 \
+ -b build-gtk3 \
--enable-webkit || cat build/config.log
-./waf build -v
+./waf build -v -b build-gtk3
+%endif
%install
-./waf install --destdir %{buildroot}
+# Install GTK2 version
+./waf install -b build-gtk2 --destdir %{buildroot}
+mv %{buildroot}%{_bindir}/xiphos %{buildroot}%{_bindir}/xiphos-gtk2
+mv %{buildroot}%{_bindir}/xiphos-nav %{buildroot}%{_bindir}/xiphos-nav-gtk2
+touch %{buildroot}%{_bindir}/xiphos
+
+# Install GTK3 version
+%if 0%{build3} > 0
+./waf install -b build-gtk3 --destdir %{buildroot}
+mv %{buildroot}%{_bindir}/xiphos %{buildroot}%{_bindir}/xiphos-gtk3
+mv %{buildroot}%{_bindir}/xiphos-nav %{buildroot}%{_bindir}/xiphos-nav-gtk3
+touch %{buildroot}%{_bindir}/xiphos
+%endif
desktop-file-install --delete-original \
--add-category=X-Bible \
@@ -80,29 +135,68 @@ rm -frv %{buildroot}%{_docdir}/%{name}
%find_lang %{name}
-%post
+# Post-install options
+%post common
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-%postun
+%if 0%{build3} > 0
+%post gtk3
+%{_sbindir}/update-alternatives --install %{_bindir}/xiphos xiphos %{_bindir}/xiphos-gtk3 10 \
+ --slave %{_bindir}/xiphos-nav xiphos-nav %{_bindir}/xiphos-nav-gtk3
+%endif
+
+%post gtk2
+%{_sbindir}/update-alternatives --install %{_bindir}/xiphos xiphos %{_bindir}/xiphos-gtk2 10 \
+ --slave %{_bindir}/xiphos-nav xiphos-nav %{_bindir}/xiphos-nav-gtk2
+
+# Post-uninstall options
+%postun common
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+%if 0%{build3} > 0
+# Pre-uninstall options
+%preun gtk3
+if [ $1 -eq 0 ]; then
+ %{_sbindir}/update-alternatives --remove xiphos %{_bindir}/xiphos-gtk3
+fi
+%endif
+
+%preun gtk2
+if [ $1 -eq 0 ]; then
+ %{_sbindir}/update-alternatives --remove xiphos %{_bindir}/xiphos-gtk2
+fi
+
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%files -f %{name}.lang
+%files gtk2
+%{_bindir}/xiphos-gtk2
+%{_bindir}/xiphos-nav-gtk2
+%ghost %{_bindir}/xiphos
+
+%if 0%{build3} > 0
+%files gtk3
+%{_bindir}/xiphos-gtk3
+%{_bindir}/xiphos-nav-gtk3
+%ghost %{_bindir}/xiphos
+%endif
+
+%files -f %{name}.lang common
%doc AUTHORS COPYING ChangeLog README RELEASE-NOTES TODO Xiphos.ogg
-%{_bindir}/xiphos
-%{_bindir}/xiphos-nav
%{_datadir}/applications/xiphos.desktop
%{_datadir}/gnome/help/xiphos
%{_datadir}/icons/hicolor/scalable/apps/xiphos.svg
%{_datadir}/omf/xiphos/
%{_datadir}/xiphos/
+%{_datadir}/appdata/xiphos.appdata.xml
%changelog
+* Tue Dec 09 2014 Greg Hellings <greg.hellings at gmail.com> 3.2.3j-1
+- Add installation of GTK2 and GTK3 versions in parallel
+
* Thu Oct 16 2014 Karsten Hopp <karsten at redhat.com> 3.2.2-2
- fix ppc64* builds
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/xiphos.git/commit/?h=epel7&id=88a8ddd072cadad409b548e5d42ccdd3a76b0b4e
More information about the scm-commits
mailing list