LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package bibletime
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Lars Vogdt
#
# 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/
#


Name:           bibletime
Version:        2.9.1
Release:        0
Summary:        An easy to use Bible study tool
License:        GPL-2.0+
Group:          Productivity/Scientific/Other
Url:            http://www.bibletime.info/
Source0:        %name-%version.tar.bz2
Source1:        %{name}.xpm
Source2:        bibletime-rpmlintrc
# PATCH-FIX-UPSTREAM fix-movetoanchor-for-qt5.patch -- fixes no text visible in bibletime's main window when used with libQtWebkit 2.3
Patch0:         fix-movetoanchor-for-qt5.patch
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  curl-devel
BuildRequires:  libqt4-devel
BuildRequires:  sword-devel
Provides:       %{name}-i18n = %version
Obsoletes:      %{name}-devel < 1.7
Obsoletes:      %{name}-i18n < 1.7
Provides:       %{name}-devel = %version
Provides:       sword-frontend
#
# openSUSE
#
%if 0%{?suse_version}
BuildRequires:  clucene-core-devel
BuildRequires:  fdupes
BuildRequires:  libQtWebKit-devel
BuildRequires:  pkg-config
BuildRequires:  update-desktop-files
Recommends:     sword-bible
Recommends:     sword-commentary
%endif
#
# Fedora
#
%if 0%{?fedora_version}
BuildRequires:  clucene-core-devel
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
%if 0%{?fedora_version} > 11
#BuildRequires:  webkitkde-devel
BuildRequires:  qt-webkit-devel
%else
BuildRequires:  WebKit-qt-devel
%endif
%endif
#
# Mandriva
#
%if 0%{?mandriva_version}
BuildRequires:  desktop-file-utils
BuildRequires:  libclucene-devel
BuildRequires:  pkgconfig
%endif

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define         kdeprefix %{_prefix}

%description
BibleTime is a completely free Bible study program.

The software uses the SWORD programming library to work with over 200 free
Bible texts, commentaries, dictionaries and books provided by the Crosswire
Bible Society.

BibleTime provides easy handling of digitalized texts (Bibles, commentaries and
lexicons) and powerful features to work with these texts (search in texts,
write own notes, save, print etc.).

%prep
%setup -q
%patch0 -p1

%build
mkdir build
pushd build >/dev/null
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%{_prefix}" ../
%{__make} %{?_smp_mflags}
popd >/dev/null

%install 
pushd build >/dev/null
make install DESTDIR="%{buildroot}"
popd >/dev/null
# fix language pathnames
test -d %{buildroot}%kdeprefix/share/locale/pt_br && mv %{buildroot}%kdeprefix/share/locale/pt_br %{buildroot}%kdeprefix/share/locale/pt_BR
test -d %{buildroot}%kdeprefix/share/doc/HTML/pt-br && mv %{buildroot}%kdeprefix/share/doc/HTML/pt-br %{buildroot}%kdeprefix/share/doc/HTML/pt_BR
# install manpages
install -Dm644 docs/manpages/bibletime.1 %{buildroot}%{_mandir}/man1/bibletime.1
install -Dm644 docs/manpages/bibletime.de.1 %{buildroot}%{_mandir}/de/man1/bibletime.1
install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
%if 0%{?suse_version}
	%fdupes -s %{buildroot}
	sed -i "s|bibletime/handbook/index.html|bibletime/handbook/en/index.html|" %{buildroot}%{_datadir}/applications/%{name}.desktop
	%suse_update_desktop_file -r %{name} Education Teaching
%endif
#
%if 0%{?fedora_version} || 0%{?mandriva_version}
install -Dm644 ./cmake/platforms/linux/bibletime.desktop.cmake %{buildroot}%{_datadir}/applications/bibletime.desktop
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc %{_mandir}/man1/bibletime.1*
%doc %{_mandir}/de/man1/bibletime.1*
%dir %kdeprefix/share/bibletime
%kdeprefix/bin/*
%kdeprefix/share/icons/*
%kdeprefix/share/pixmaps/%{name}.xpm
%kdeprefix/share/applications/bibletime.desktop
%kdeprefix/share/bibletime/*

%changelog