Blob Blame History Raw
Summary:	BibleTime is an easy to use Bible study tool for KDE
Name:		bibletime
Version:	1.6.3b
Release:	2%{?dist}
License:	GPL
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-%{version}.tar.bz2
Patch0:		%{name}-desktop.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	sword-devel >= 1.5.9 clucene-core-devel >= 0.9.16a kdelibs-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
%setup -q -D -T -a 1

%build

%configure --disable-rpath
make %{?_smp_mflags}

cd %{name}-i18n-%{version}
%configure --disable-rpath
make %{?_smp_mflags}

%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-%{version}
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-%{version}/%{name}.lang
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/apps/%{name}/
%{_datadir}/icons/hicolor/*/*
%{_includedir}/bibletimeinterface.h
%doc README LICENSE

%changelog
* Mon Feb 05 2007 David Anderson <fedora-packaging@dw-perspective.org.uk> 1.6.3b-2
- 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)