You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/redhat/applications/bibletime/trinity-bibletime.spec

139 lines
3.6 KiB

# Default version for this component
%define kdecomp bibletime
%define version 1.6.6.0
%define release 2
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
%define _docdir %{_prefix}/share/doc
%endif
# TDE 3.5.13 specific building variables
BuildRequires: autoconf automake libtool m4
%define tde_docdir %{_docdir}/kde
%define tde_includedir %{_includedir}/kde
%define tde_libdir %{_libdir}/trinity
Name: trinity-%{kdecomp}
Summary: A bible study tool for Trinity
Version: %{?version}
Release: %{?release}%{?dist}%{?_variant}
License: GPLv2+
Group: Applications/Utilities
Vendor: Trinity Project
Packager: Francois Andriot <francois.andriot@free.fr>
URL: http://www.trinitydesktop.org
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{kdecomp}-3.5.13.tar.gz
# Fix detection of older versions of clucene in Fedora >= 16
Patch0: bibletime-3.5.13-clucene_detection.patch
# [bibletime] Fix compilation with GCC 4.7
Patch1: bibletime-3.5.13-fix_gcc47_compilation.patch
BuildRequires: tqtinterface-devel
BuildRequires: trinity-kdelibs-devel
BuildRequires: trinity-kdebase-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
%if 0%{?fedora} >= 16
BuildRequires: clucene09-core-devel
%else
BuildRequires: clucene-core-devel
%endif
BuildRequires: sword-devel
Requires: sword
%description
BibleTime is a free and easy to use bible study tool for UNIX systems.
It requires a working KDE environment and the SWORD library.
BibleTime provides easy handling of digitized 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 -n applications/%{kdecomp}
%patch0 -p0
%patch1 -p1
# Ugly hack to modify TQT include directory inside autoconf files.
# If TQT detection fails, it fallbacks to TQT4 instead of TQT3 !
%__sed -i admin/acinclude.m4.in \
-e "s|/usr/include/tqt|%{_includedir}/tqt|g" \
-e "s|kde_htmldir='.*'|kde_htmldir='%{tde_docdir}/HTML'|g"
%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"
%build
export PATH="%{_bindir}:${PATH}"
export LDFLAGS="-L%{_libdir} -I%{_includedir}"
%configure \
--disable-rpath \
--with-extra-includes=%{_includedir}/tqt
# Not SMP safe !
%__make -C bibletime/frontend
# SMP safe !
%__make %{?_smp_mflags}
%install
export PATH="%{_bindir}:${PATH}"
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}
%__chmod 644 %{buildroot}%{_datadir}/apps/bibletime/pics/*
%__chmod 644 %{buildroot}%{_datadir}/apps/bibletime/bibletimeui.rc
%__chmod 644 %{buildroot}%{_datadir}/apps/bibletime/tips
%clean
%__rm -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
/sbin/ldconfig || :
%postun
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
/sbin/ldconfig || :
%files
%defattr(-,root,root,-)
%{_bindir}/bibletime
%{_includedir}/bibletimeinterface.h
%{_datadir}/applications/bibletime.desktop
%{_datadir}/apps/bibletime
%{_datadir}/icons/hicolor/*/*/*.png
%{tde_docdir}/HTML/en/bibletime/
%Changelog
* Tue May 01 2012 Francois Andriot <francois.andriot@free.fr> - 1.6.6.0-2
- Fix compilation on RHEL 5
- Fix compilation with GCC 4.7
* Tue Nov 29 2011 Francois Andriot <francois.andriot@free.fr> - 1.6.6.0-1
- Initial build for RHEL 5, RHEL 6, Fedora 15, Fedora 16