- specfile cleanup

- fix license to be in SPDX format
- fix build on Fedora and Mandriva

OBS-URL: https://build.opensuse.org/package/show/Education/bibletime?expand=0&rev=31
This commit is contained in:
Lars Vogdt
2012-12-16 00:00:01 +00:00
committed by Git OBS Bridge
parent 5cef6aae7d
commit ebd3a7759e
2 changed files with 52 additions and 42 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Dec 15 23:59:15 UTC 2012 - lars@linux-schulserver.de
- specfile cleanup
- fix license to be in SPDX format
- fix build on Fedora and Mandriva
-------------------------------------------------------------------
Fri Dec 30 08:34:18 UTC 2011 - lars@linux-schulserver.de

View File

@@ -1,44 +1,51 @@
#
# spec file for package bibletime
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# 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/
#
# norootforbuild
Name: bibletime
Summary: An easy to use Bible study tool
Version: 2.9.1
Release: 1
License: GNU General Public License version 2 (GPL v2)
License: GPL-2.0+
Summary: An easy to use Bible study tool
Url: http://www.bibletime.info/
Group: Productivity/Scientific/Other
Vendor: openSUSE-Education
Source0: %name-%version.tar.bz2
Source1: %{name}.xpm
Source2: bibletime-rpmlintrc
Provides: %{name}-i18n = %version
Obsoletes: %{name}-i18n < 1.7
Obsoletes: %{name}-devel < 1.7
Provides: %{name}-devel = %version
Provides: sword-frontend
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: libqt4-devel
BuildRequires: sword-devel
Provides: %{name}-i18n = %version
Obsoletes: %{name}-i18n < 1.7
Obsoletes: %{name}-devel < 1.7
Provides: %{name}-devel = %version
Provides: sword-frontend
#
# openSUSE
#
%if 0%{?suse_version}
Recommends: sword-bible
Recommends: sword-commentary
BuildRequires: clucene-core-devel
BuildRequires: fdupes
BuildRequires: libQtWebKit-devel
BuildRequires: pkg-config
BuildRequires: update-desktop-files
Recommends: sword-bible
Recommends: sword-commentary
%endif
#
# Fedora
@@ -46,9 +53,11 @@ BuildRequires: update-desktop-files
%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: webkitkde-devel
BuildRequires: qt-webkit-devel
%else
BuildRequires: WebKit-qt-devel
%endif
@@ -57,9 +66,9 @@ BuildRequires: WebKit-qt-devel
# Mandriva
#
%if 0%{?mandriva_version}
BuildRequires: pkgconfig
BuildRequires: desktop-file-utils
BuildRequires: libclucene-devel
BuildRequires: pkgconfig
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -81,40 +90,34 @@ write own notes, save, print etc.).
%build
mkdir build
pushd build
pushd build >/dev/null
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%{_prefix}" ../
%__make %{?_smp_mflags}
popd
%{__make} %{?_smp_mflags}
popd >/dev/null
%install
pushd build
make DESTDIR=%buildroot install
popd
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
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
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
%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%{?mandriva_version}
install -Dm644 ./cmake/platforms/linux/bibletime.desktop.cmake %buildroot/%_datadir/applications/bibletime.desktop
%endif
%if 0%{?fedora_version} || 0%{?mandriva_version}
desktop-file-install --vendor="%{vendor}" \
--dir=%buildroot/%_datadir/applications \
%name.desktop
install -Dm644 ./cmake/platforms/linux/bibletime.desktop.cmake %{buildroot}%{_datadir}/applications/bibletime.desktop
%endif
%clean
rm -rf %buildroot
rm -rf %{buildroot}
%files
%defattr(-,root,root)