Blob Blame History Raw
Summary:	BibleTime is an easy to use Bible study tool for KDE
Name:		bibletime
Version:	1.6.5.1
Release:	1%{?dist}
License:	GPLv2
Url:		http://www.bibletime.info/
Group:		Applications/Productivity
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1:	http://downloads.sourceforge.net/%{name}/%{name}-i18n-1.6.5.tar.bz2
Patch0:		%{name}-desktop.patch
Patch1:		%{name}-config.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	sword-devel >= 1.5.10 clucene-core-devel >= 0.9.16a kdelibs3-devel
BuildRequires:	desktop-file-utils gettext

%description
BibleTime is a free and easy to use bible study tool for UNIX systems.

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.).
BibleTime is a frontend for the  SWORD Bible Framework.

%prep

%setup -q
%patch0 -p0 -b .desk
%patch1 -p0 -b .conf
%setup -q -D -T -a 1

%build

unset QTDIR || : ; . %{_sysconfdir}/profile.d/qt.sh
export QTLIB=${QTDIR}/lib QTINC=${QTDIR}/include
%configure --disable-rpath
make
#make %{?_smp_mflags} :Causing spuring build errors

cd %{name}-i18n-1.6.5
%configure --disable-rpath
make
#make %{?_smp_mflags} :Causing spuring build errors

%install
%{__rm} -rf %{buildroot}

make DESTDIR=%{buildroot} install

desktop-file-install --vendor="" \
	--dir=%{buildroot}%{_datadir}/applications \
	--delete-original \
	%{buildroot}%{_datadir}/applications/%{name}.desktop

chmod 0644 %{buildroot}%{_datadir}/apps/%{name}/bibletimeui.rc
chmod 0644 %{buildroot}%{_datadir}/apps/%{name}/tips

cd %{name}-i18n-1.6.5
make DESTDIR=%{buildroot} install

# remove empty file
[[ -s %{buildroot}%{_datadir}/doc/HTML/cs/%{name}/howto/how2-importance.docbook ]] || rm -f %{buildroot}%{_datadir}/doc/HTML/cs/%{name}/howto/how2-importance.docbook

# rename wrongly-named locale
mv %{buildroot}%{_datadir}/locale/pt_br %{buildroot}%{_datadir}/locale/pt_BR || :
mv %{buildroot}%{_datadir}/doc/HTML/pt_br %{buildroot}%{_datadir}/doc/HTML/pt_BR || :

%find_lang %{name} || touch %{name}.lang
HTML_DIR=$(kde-config --expandvars --install html)
if [ -d %{buildroot}$HTML_DIR ]; then
	for lang_dir in %{buildroot}$HTML_DIR/* ; do
		lang=$(basename $lang_dir)
		echo "%lang($lang) %doc $HTML_DIR/$lang/*" >> %{name}.lang
	done
fi

%clean
%{__rm} -rf %{buildroot}

%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%files -f %{name}-i18n-1.6.5/%{name}.lang
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/apps/%{name}/
%{_datadir}/icons/hicolor/*/*
%{_includedir}/bibletimeinterface.h
%doc README LICENSE

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

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.6.5-4
- Autorebuild for GCC 4.3

* Wed Feb 13 2008 Deji Akingunola <dakingun@gmail.com> 1.6.5-3
- Rebuild for gcc-4.3

* Tue Jan 02 2008 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.5-2
- BR kdelibs3-devel

* Tue Nov 06 2007 Deji Akingunola <dakingun@gmail.com> 1.6.5-1
- 1.6.5

* Mon May 04 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.4-2
- 1.6.4

* Mon Feb 05 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.3b-3
- 1.6.3b

* Sat Jan 27 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.2-5
- Correct wrong location of pt_BR files

* Mon Jan 15 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.2-4
- Added internationalisation

* Fri Jan 12 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.2-2
- Cleanups (thanks to Deji Akingunola)

* Fri Jan 12 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.2-1
- First attempt for Fedora Extras
- (Credits to Joachim Ansorg and Brook Humphrey for previous
- version from bibletime tarball)