LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xiphos.spec of Package xiphos (Project Education)

# spec file for package xiphos
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

%if ( 0%{?suse_version} >= 1200 || 0%{?fedora} > 14 )
%define		gtk3 1

Name:           xiphos
Version:        3.1.5
Release:        0
License:        GPL-2.0
Summary:        GNOME-based Bible research tool
Url:            http://xiphos.org/
Group:          Productivity/Scientific/Other
Source0:        xiphos-3.1.5.tar.bz2
Source1:        %{name}.desktop

BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gettext-devel
BuildRequires:  glibc-devel
BuildRequires:  intltool
%if %{undefined mdkversion}
BuildRequires:  libbonobo-devel
BuildRequires:  libgnomeui-devel
BuildRequires:  libgsf-devel
BuildRequires:  libidn-devel
BuildRequires:  pcre-devel
BuildRequires:  perl-XML-Parser
BuildRequires:  scrollkeeper
BuildRequires:  sword-devel > 1.6.2
%if ( %{undefined centos_version} && 0%{?suse_version} != 1110 )
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libglade-2.0)

%if ( %{undefined fedora} && %{undefined centos_version} && %{undefined mdkversion} && 0%{?suse_version} != 1110 )

BuildRequires:  gnome-doc-utils-devel
BuildRequires:  libMagick++-devel
BuildRequires:  xorg-x11-libXdmcp-devel

  %if %{defined gtk3}
BuildRequires:  libwebkitgtk3-devel
BuildRequires:  libwebkitgtk-devel
# CentOS
%if %{defined centos_version}
BuildRequires:  perl-Compress-Zlib
BuildRequires:  cairo-devel
BuildRequires:  dbus-glib-devel
BuildRequires:  glib2-devel
BuildRequires:  gtk2-devel
BuildRequires:  libglade2-devel
BuildRequires:  gnome-doc-utils
BuildRequires:  libXdmcp-devel
BuildRequires:  sane-backends-libs
BuildRequires:  gtkhtml3-devel
  %if 0%{?centos_version} >= 600
BuildRequires:  webkitgtk-devel
BuildRequires:  libcurl-devel
BuildRequires:  curl-devel
BuildRequires:  xulrunner-devel
BuildRequires:  python26
BuildRequires:  sqlite
%define		xulbuild 1
# openSUSE
%if %{defined suse_version}
BuildRequires:  update-desktop-files
%if %{defined gtk3}
BuildRequires:  gtkhtml-devel
BuildRequires:  gtkhtml2-devel
Recommends:     sword-bible
Recommends:     sword-commentary
%if 0%{?suse_version} <= 1130
BuildRequires:  gnome-spell2
%if 0%{?suse_version} == 1110
BuildRequires:  mozilla-xulrunner190-devel
BuildRequires:  gnome-doc-utils
%define		xulbuild 1
# Fedora
%if %{defined fedora}
BuildRequires:  gnome-doc-utils
BuildRequires:  libXdmcp-devel
BuildRequires:  sane-backends-libs
BuildRequires:  gtkhtml3-devel
BuildRequires:  webkitgtk3-devel
# Mandriva
%if %{defined mdkversion}
BuildRequires:  pkgconfig(libbonobo-2.0)
BuildRequires:  libgnomeui2-devel
BuildRequires:  gnome-doc-utils
BuildRequires:  libMagick-devel
BuildRequires:  libxdmcp-devel
BuildRequires:  polkit-gnome

Provides:       sword-frontend
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Bible Study Software for the Linux community. Lookup and search Bible texts and
commentaries. Xiphos uses modules and libraries from the SWORD Project.
Display multiple translations in the interlinear window. Search for passages in
any translation by word, phrase, or regular expression. Install this package
if you want to browse the Bible translations and reference works distributed
by Crosswire Bible Society through the SWORD Project.

%setup -q -n xiphos-3.1.5

# SLES lacks the abillity to build help files for some reason
%if %{defined sles_version}
%define EXTRAOPTS --disable-help

rm -rf build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
%if ( %{defined centos_version} && 0%{?centos_version} < 600 )
/usr/bin/python26 \
%if %{defined xulbuild}
./waf configure --prefix=%{_prefix} --backend=xulrunner --gtk=2 %{?EXTRAOPTS}
  %if %{defined gtk3}
./waf configure --prefix=%{_prefix} --backend=webkit --gtk=3
./waf configure --prefix=%{_prefix} --backend=webkit --gtk=2
./waf build

./waf install --destdir=%{buildroot}

install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file -n %{buildroot}%{_datadir}/applications/%{name}.desktop

%if ( %{undefined fedora} && %{undefined centos_version} )
mkdir -p %{buildroot}%_defaultdocdir/%{name}
mv %{buildroot}%{_datadir}/doc/%{name}/* %{buildroot}%_defaultdocdir/%{name}/
rmdir %{buildroot}%{_datadir}/doc/%{name}

rm %{buildroot}%_defaultdocdir/%{name}/INSTALL

install -Dm644 xiphos.1 %{buildroot}%{_mandir}/man1/xiphos.1

%find_lang %{name}

%if %{undefined fedora}
%fdupes -s %{buildroot}

rm -rf %{buildroot}

%if 0%{?suse_version} > 1130

%if 0%{?suse_version} > 1130

%files -f %{name}.lang
%dir %{_datadir}/%{name}
%if ( %{defined centos_version} || %{defined fedora} )