summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kerry/trinity-kerry.spec
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/applications/kerry/trinity-kerry.spec')
-rw-r--r--redhat/applications/kerry/trinity-kerry.spec113
1 files changed, 69 insertions, 44 deletions
diff --git a/redhat/applications/kerry/trinity-kerry.spec b/redhat/applications/kerry/trinity-kerry.spec
index cfe73a43d..683baa429 100644
--- a/redhat/applications/kerry/trinity-kerry.spec
+++ b/redhat/applications/kerry/trinity-kerry.spec
@@ -1,25 +1,32 @@
# Default version for this component
%define kdecomp kerry
-%define version 0.2.1
-%define release 1
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
-%if "%{?_prefix}" != "/usr"
+%if "%{?tde_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
+%define tde_bindir %{tde_prefix}/bin
+%define tde_datadir %{tde_prefix}/share
+%define tde_docdir %{tde_datadir}/doc
+%define tde_includedir %{tde_prefix}/include
+%define tde_libdir %{tde_prefix}/%{_lib}
+%define tde_mandir %{tde_datadir}/man
+%define tde_appdir %{tde_datadir}/applications
+
+%define tde_tdeappdir %{tde_appdir}/kde
+%define tde_tdedocdir %{tde_docdir}/kde
+%define tde_tdeincludedir %{tde_includedir}/kde
+%define tde_tdelibdir %{tde_libdir}/trinity
+
+%define _docdir %{tde_docdir}
Name: trinity-%{kdecomp}
Summary: a KDE frontend for the Beagle desktop search daemon [Trinity]
-Version: %{?version}
-Release: %{?release}%{?dist}%{?_variant}
+Version: 0.2.1
+Release: 1%{?dist}%{?_variant}
License: GPLv2+
Group: Applications/Utilities
@@ -28,21 +35,29 @@ Vendor: Trinity Project
Packager: Francois Andriot <francois.andriot@free.fr>
URL: http://en.opensuse.org/Kerry
-Prefix: %{_prefix}
+Prefix: %{tde_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{kdecomp}-3.5.13.tar.gz
Source1: kerry.1.docbook
+# [kerry] Missing LDFLAGS cause FTBFS on Mageia and Mandriva
+Patch1: kerry-3.5.13-missing_ldflags.patch
+
+
BuildRequires: tqtinterface-devel
-BuildRequires: trinity-kdelibs-devel
-BuildRequires: trinity-kdebase-devel
+BuildRequires: trinity-tdelibs-devel
+BuildRequires: trinity-tdebase-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
-
BuildRequires: libbeagle-devel >= 0.3.0
-#BuildRequires: docbook-utils
+
+
+%if 0%{?mgaversion} || 0%{?mdkversion}
+BuildRequires: docbook2x
+%else
BuildRequires: docbook2X
+%endif
%description
Kerry is a Trinity frontend for the Beagle desktop search daemon.
@@ -54,12 +69,13 @@ filesystems, chat logs, mail and data, RSS and other.
%prep
%setup -q -n applications/%{kdecomp}
+%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"
+ -e "s|/usr/include/tqt|%{tde_includedir}/tqt|g" \
+ -e "s|kde_htmldir='.*'|kde_htmldir='%{tde_tdedocdir}/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"
@@ -67,19 +83,26 @@ filesystems, chat logs, mail and data, RSS and other.
%build
-export PATH="%{_bindir}:${PATH}"
-export LDFLAGS="-L%{_libdir} -I%{_includedir}"
+unset QTDIR; . /etc/profile.d/qt.sh
+export PATH="%{tde_bindir}:${PATH}"
+export LDFLAGS="-L%{tde_libdir} -I%{tde_includedir}"
%configure \
- --disable-rpath \
- --with-extra-includes=%{_includedir}/tqt
+ --prefix=%{tde_prefix} \
+ --exec-prefix=%{tde_prefix} \
+ --bindir=%{tde_bindir} \
+ --datadir=%{tde_datadir} \
+ --libdir=%{tde_libdir} \
+ --mandir=%{tde_mandir} \
+ --disable-rpath \
+ --with-extra-includes=%{tde_includedir}/tqt:%{tde_includedir}
%__make %{?_smp_mflags}
%install
-export PATH="%{_bindir}:${PATH}"
+export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}
@@ -93,34 +116,36 @@ export PATH="%{_bindir}:${PATH}"
%post
-/sbin/ldconfig
-touch --no-create %{_datadir}/icons/hicolor || :
-gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+/sbin/ldconfig || :
+touch --no-create %{tde_datadir}/icons/hicolor || :
+gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
+update-desktop-database %{tde_appdir} &> /dev/null
%postun
-/sbin/ldconfig
-touch --no-create %{_datadir}/icons/hicolor || :
-gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+/sbin/ldconfig || :
+touch --no-create %{tde_datadir}/icons/hicolor || :
+gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
+update-desktop-database %{tde_appdir} &> /dev/null
%files -f %{kdecomp}.lang
%defattr(-,root,root,-)
-%{_datadir}/locale/*/LC_MESSAGES/kcmbeagle.mo
-%{_bindir}/beagled-shutdown
-%{_bindir}/kerry
-%{_libdir}/libkdeinit_kerry.la
-%{_libdir}/libkdeinit_kerry.so
-%{tde_libdir}/kcm_beagle.la
-%{tde_libdir}/kcm_beagle.so
-%{tde_libdir}/kerry.la
-%{tde_libdir}/kerry.so
-%{_datadir}/applications/kde/kcmbeagle.desktop
-%{_datadir}/applications/kde/kerry.desktop
-%{_datadir}/applnk/.hidden/kcmkerry.desktop
-%{_datadir}/apps/kerry/search-running.mng
-%{_datadir}/autostart/beagled.desktop
-%{_datadir}/autostart/kerry.autostart.desktop
-%{_datadir}/icons/hicolor/*/*/*
+%{tde_datadir}/locale/*/LC_MESSAGES/kcmbeagle.mo
+%{tde_bindir}/beagled-shutdown
+%{tde_bindir}/kerry
+%{tde_libdir}/libkdeinit_kerry.la
+%{tde_libdir}/libkdeinit_kerry.so
+%{tde_tdelibdir}/kcm_beagle.la
+%{tde_tdelibdir}/kcm_beagle.so
+%{tde_tdelibdir}/kerry.la
+%{tde_tdelibdir}/kerry.so
+%{tde_tdeappdir}/kcmbeagle.desktop
+%{tde_tdeappdir}/kerry.desktop
+%{tde_datadir}/applnk/.hidden/kcmkerry.desktop
+%{tde_datadir}/apps/kerry/search-running.mng
+%{tde_datadir}/autostart/beagled.desktop
+%{tde_datadir}/autostart/kerry.autostart.desktop
+%{tde_datadir}/icons/hicolor/*/*/*
%Changelog