Blob Blame History Raw
# 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:        4.0.3
Release:        1%{?dist}
Summary:        Bible study and research tool
License:        GPLv2+
URL:            http://xiphos.org/
Source0:        http://downloads.sourceforge.net/gnomesword/xiphos-%{version}.tar.gz
BuildRequires:  biblesync-devel >= 1.1.2
BuildRequires:  desktop-file-utils
BuildRequires:  dbus-glib-devel
BuildRequires:  docbook-utils
BuildRequires:  GConf2-devel
BuildRequires:  gettext
BuildRequires:  gnome-doc-utils
BuildRequires:  libglade2-devel
BuildRequires:  gtkhtml3-devel
BuildRequires:  compat-gtkhtml314-devel
BuildRequires:  intltool
BuildRequires:  libgsf-devel
BuildRequires:  libuuid-devel
BuildRequires:  rarian-compat
BuildRequires:  sword-devel >= 1.7.3
BuildRequires:  webkitgtk-devel
%if 0%{build3} > 0
BuildRequires:  gtk3-devel
BuildRequires:  webkitgtk3-devel
%endif
Requires:       yelp

%description
Xiphos 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.

%package gtk2
Obsoletes:      xiphos < 4.0.0
Requires:       %{name}-common = %{version}-%{release}
Summary:        A version of Xiphos built against the GTK2 toolkit

%description gtk2
Xiphos 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 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 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
# Ugly hack because of bugs in this version of waf
mkdir gtk2
cp -r * gtk2 || true
mkdir gtk3
cp -r gtk2/* gtk3

%build
export CC="gcc -fPIC"
export CXX="g++ -fPIC"
%ifarch %{power64}
 CFLAGS="$CFLAGS -D__SANE_USERSPACE_TYPES__"
 CXXFLAGS="$CXXFLAGS -D__SANE_USERSPACE_TYPES__"
%endif
export CXXFLAGS
export CFLAGS

# Build GTK2 version
pushd gtk2
LDFLAGS='%{?__global_ldflags}'                              \
./waf configure	                     \
        --prefix=%{_prefix}          \
        --gtk=2 || cat build/config.log

./waf build -v
popd

# Build GTK3 version
%if 0%{build3} > 0
pushd gtk3
LDFLAGS='%{?__global_ldflags}'      \
./waf configure                     \
        --prefix=%{_prefix}         \
        --gtk=3 || cat build/config.log

./waf build -v
popd
%endif

%install
# Install GTK2 version
pushd gtk2
./waf install -b . --destdir %{buildroot}
mv %{buildroot}%{_bindir}/xiphos %{buildroot}%{_bindir}/xiphos-gtk2
mv %{buildroot}%{_bindir}/xiphos-nav %{buildroot}%{_bindir}/xiphos-nav-gtk2
touch %{buildroot}%{_bindir}/xiphos
popd

# Install GTK3 version
%if 0%{build3} > 0
pushd gtk3
./waf install --destdir %{buildroot}
mv %{buildroot}%{_bindir}/xiphos %{buildroot}%{_bindir}/xiphos-gtk3
mv %{buildroot}%{_bindir}/xiphos-nav %{buildroot}%{_bindir}/xiphos-nav-gtk3
touch %{buildroot}%{_bindir}/xiphos
popd
%endif

desktop-file-install --delete-original         \
	--add-category=X-Bible                     \
	--add-category=X-Religion                  \
	--dir=%{buildroot}%{_datadir}/applications \
	--copy-name-to-generic-name                \
	%{buildroot}%{_datadir}/applications/xiphos.desktop

# package docs with macro
rm -frv %{buildroot}%{_docdir}/%{name}

%find_lang %{name}

# Post-install options
%post common
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%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 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
%{_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
* Fri Aug 07 2015 Greg Hellings <greg.hellings@gmail.com - 4.0.3-1
- Update to new upstream version
- Fix major bug with large (> 200) language sets in a repository

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Apr 15 2015 Greg Hellings <greg.hellings@gmail.com> 4.0.2-1
- Version bump - major upstream memory bugs

* Wed Apr 08 2015 Greg Hellings <greg.hellings@gmail.com> 4.0.1-1
- Version bump

* Fri Jan 16 2015 Greg Hellings <greg.hellings@gmail.com> 4.0.0-4
- Added GTK compat so that we can link against GTK2 all the way

* Wed Dec 24 2014 Greg Hellings <greg.hellings@gmail.com> 4.0.0-3
- New upstream tarball (same version)

* Wed Dec 24 2014 Greg Hellings <greg.hellings@gmail.com> 4.0.0-2
- Updated xiphos-compat obsoletes

* Tue Dec 23 2014 Greg Hellings <greg.hellings@gmail.com> 4.0.0-1
- New upstream version
- Removed obsolete build flags
- Removed references to GnomeSword (> 6 years old, version 2.x name)
- Added biblesync-devel minimum version

* Tue Dec 16 2014 Greg Hellings <greg.hellings@gmail.com> 3.2.3j-3
- Added workaround for waf insufficiently isolating multi-build

* Wed Dec 10 2014 Greg Hellings <greg.hellings@gmail.com> 3.2.3j-2
- Obsoleted old Xiphos unary package

* Tue Dec 09 2014 Greg Hellings <greg.hellings@gmail.com> 3.2.3j-1
- Add installation of GTK2 and GTK3 versions in parallel

* Thu Oct 16 2014 Karsten Hopp <karsten@redhat.com> 3.2.2-2
- fix ppc64* builds

* Mon Aug 25 2014 Greg Hellings <greg.hellings@gmail.com> - 3.2.2-1
- New upstream version

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Aug 02 2014 Christopher Meng <rpm@cicku.me> - 3.2.1-2
- Build against GTK+3

* Tue Jun 10 2014 Greg Hellings <greg.hellings@gmail.com> - 3.2.1-1
- New upstream release

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 16 2014 Greg Hellings <greg.hellings@gmail.com> - 3.2.0-1
- New upstream release

* Wed Jan 29 2014 Greg Hellings <greg.hellings@gmail.com> - 3.1.6-2
- Removed GTK3 in favor of GTK2, as GTK3 is known to be buggy for this release

* Wed Jan 29 2014 Deji Akingunola <dakingun@gmail.com> - 3.1.6-1
- Update to version 3.1.6

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Feb 22 2012 Deji Akingunola <dakingun@gmail.com> - 3.1.5-1
- Update to version 3.1.5

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 3.1.4-7
- Rebuild for new libpng

* Mon Jun 27 2011 Deji Akingunola <dakingun@gmail.com> - 3.1.4-6
- Update to svn snapshot from the webkit branch for gtk3 support

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Feb 01 2011 Deji Akingunola <dakingun@gmail.com> - 3.1.4-4
- Rebuild for newer gtkhtml3

* Thu Dec 23 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.4-3
- Apply patch to bump the upper limit of allowable xulrunner version

* Wed Dec 22 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.4-2
- Rebuild for newer xulrunner and gtkhtml3

* Sun Oct 17 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.4-1
- Update to 3.1.4

* Fri Jul 16 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.3-3
- Rebuild (with a small patch) for gtkhtml3-3.31.5.

* Fri May 28 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.3-2
- Apply Karl Kleinpaste patch to fix the jump-to-anchor failure.

* Tue Mar 23 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.3-1
- New upstream version

* Mon Mar 15 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.2-4
- Backport upstream patch to fix bugs detected by ABRT caused by empty settings.xml file.

* Sat Mar 13 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.2-3
- Backport upstream patch to fix bug with xulrunner-1.9.2.

* Sun Mar 07 2010 Deji Akingunola <dakingun@gmail.com> - 3.1.2-2
- Rebuild with current xulrunner to fix crashes.

* Tue Dec 29 2009 Deji Akingunola <dakingun@gmail.com> - 3.1.2-1
- New upstream version

* Mon Aug 10 2009 Deji Akingunola <dakingun@gmail.com> - 3.1.1-1
- New upstream version

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 18 2009 Deji Akingunola <dakingun@gmail.com> - 3.1-1
- Update to the 3.1 release

* Tue Mar 10 2009 Deji Akingunola <dakingun@gmail.com> - 3.0.1-2
- Couple of fixes from package review (Nils Philippsen)

* Fri Feb 20 2009 Deji Akingunola <dakingun@gmail.com> - 3.0.1-1
- Update to the bugfix 3.0.1 release

* Sun Feb 08 2009 Deji Akingunola <dakingun@gmail.com> - 3.0.0-1
- Gnomesword renamed to Xiphos
- First release under the new name

* Thu Nov 20 2008 Deji Akingunola <dakingun@gmail.com> - 2.4.1-1
- Update to 2.4.1

* Sun Sep 21 2008 Deji Akingunola <dakingun@gmail.com> - 2.4.0-1
- Update to 2.4.0

* Sat Aug 02 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.6-2
- Package the 'RELEASE-NOTES'

* Sat Aug 02 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.6-1
- Update to 2.3.6

* Thu Jul 24 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.5-2
- Bump EVR 

* Thu Jul 03 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.5-1
- Update to 2.3.5

* Mon Jun 23 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.4-2
- Remove --enable-gtkthml configure option, to enable gecko support

* Mon May 26 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.4-1
- Update to 2.3.4

* Sun Feb 10 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.3-2
- Rebuild for gcc43

* Sun Jan 20 2008 Deji Akingunola <dakingun@gmail.com> - 2.3.3-1
- Update to 2.3.3

* Fri Dec 28 2007 Deji Akingunola <dakingun@gmail.com> - 2.3.2-1
- Update to 2.3.2

* Thu Dec 20 2007 Deji Akingunola <dakingun@gmail.com> - 2.3.1-4
- Build with gtkhtml for now, until building with latest xulrunner is fixed

* Thu Nov 29 2007 Deji Akingunola <dakingun@gmail.com> - 2.3.1-3
- Rebuild for firefox-2.0.0.10

* Tue Nov 06 2007 Deji Akingunola <dakingun@gmail.com> - 2.3.1-2
- Rebuild for firefox-2.0.0.9

* Mon Nov 05 2007 Deji Akingunola <dakingun@gmail.com> - 2.3.1
- Update to version 2.3.1

* Sat Aug 25 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.3-5
- Rebuild

* Fri Aug 03 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.3-4
- License tag update
- Rebuild for new icu

* Sat Jun 09 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.3-3
- Require 'yelp' for the Help menu (BZ #243395)
- Remove extraneous key from the desktop file

* Sun Mar 25 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.3
- Version 2.2.3
- Configure tweak no longer necesary, gtkhtml38 now in Extras

* Tue Mar 13 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.2.1-5
- Tweak configure script to allow building with newer gtkhml3

* Tue Mar 13 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.2.1-4
- Another rebuild for gtkhtml

* Wed Feb 28 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.2.1-3
- Rebuild for new gtkhtml

* Sat Feb 24 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.2.1-2
- Add libgnomeprintui22-devel as BR

* Fri Feb 23 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.2.1-1
- New release

* Sun Jan 28 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.1-1
- Remove un-neccesary gnome-spell and icu BRs

* Sat Jan 27 2007 Deji Akingunola <dakingun@gmail.com> - 2.2.1-1
- Update to 2.2.1

* Tue Dec 26 2006 Deji Akingunola <dakingun@gmail.com> - 2.2.0-1
- New stable release

* Sun Dec 10 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.10-3
- Add gnome-doc-utils to BR

* Sun Dec 10 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.10-2
- Clean up spec file

* Sun Dec 10 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.10-1
- New Release

* Mon Nov 13 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.9-1
- New release (2.1.9)

* Thu Nov 09 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.8-3
- Seems parallel make is causing problems

* Thu Nov 09 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.8-2
- Fix Build requires

* Wed Nov 08 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.8-1
- Update to new (unstable) version 

* Wed Sep 20 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.6-4
- Add perl(XML::Parser) to the BRs

* Wed Sep 20 2006 Deji Akingunola <dakingun@gmail.com> - 2.1.6-3
- Take over from Michael A. Peters
- Rebuild for FC6

* Tue May 02 2006 Michael A. Peters <mpeters@mac.com> - 2.1.6-2
- Fixed crash when viewing OT using KJV module (Patch0)
- Closes bug 190413

* Tue Apr 25 2006 Michael A. Peters <mpeters@mac.com> - 2.1.6-1
- New upstream version
- removed commented out fixes for since upstream fixed 64-bit issues

* Mon Apr 17 2006 Michael A. Peters <mpeters@mac.com> - 2.1.5-3
- fix bug 188581 (187198)

* Sat Feb 18 2006 Michael A. Peters <mpeters@mac.com> - 2.1.5-2
- Rebuild in devel

* Wed Dec 14 2005 Michael A. Peters <mpeters@mac.com> - 2.1.5-1
- New upstream version, works with gtkhtml3-3.8
- disable x86_64 patch

* Thu Sep 15 2005 Michael A. Peters <mpeters@mac.com> - 2.1.2-2.3
- trying patch suggested by Tom 'spot' Callaway to fix x86_64 bug
- 160186
- libtool, aclocal, autoheader, automake, autoconf on x86_64

* Sun Jun 12 2005 Michael A. Peters <mpeters@mac.com> - 2.1.2-2.1
- Exclude x86_64 for now

* Thu Jun 09 2005 Michael A. Peters <mpeters@mac.com> - 2.1.2-2
- added --copy-name-to-generic-name to desktop-file-install
- fixed line break packaging error

* Mon Jun 06 2005 Michael A. Peters <mpeters@mac.com> - 2.1.2-1
- Initial cvs checkin for Fedora Extras