diff options
Diffstat (limited to 'redhat/applications/kchmviewer/trinity-kchmviewer.spec')
-rw-r--r-- | redhat/applications/kchmviewer/trinity-kchmviewer.spec | 73 |
1 files changed, 44 insertions, 29 deletions
diff --git a/redhat/applications/kchmviewer/trinity-kchmviewer.spec b/redhat/applications/kchmviewer/trinity-kchmviewer.spec index 5b1c28d58..c3fb589ab 100644 --- a/redhat/applications/kchmviewer/trinity-kchmviewer.spec +++ b/redhat/applications/kchmviewer/trinity-kchmviewer.spec @@ -1,25 +1,32 @@ # Default version for this component %define kdecomp kchmviewer -%define version 3.1.2 -%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" +%if "%{?tde_prefix}" != "/usr" %define _variant .opt -%define _docdir %{_prefix}/share/doc %endif -# TDE 3.5.12 specific building variables -BuildRequires: autoconf automake libtool m4 -%define tde_docdir %{_docdir}/kde -%define tde_includedir %{_includedir}/kde -%define tde_libdir %{_libdir}/trinity +# TDE 3.5.13 specific building variables +%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: CHM viewer for Trinity -Version: %{?version} -Release: %{?release}%{?dist}%{?_variant} +Version: 3.1.2 +Release: 2%{?dist}%{?_variant} License: GPLv2+ Group: Applications/Utilities @@ -32,7 +39,9 @@ Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: %{kdecomp}-3.5.13.tar.gz -Patch0: kchmviewer-3.5.13-ftbfs.patch + +# [kchmviewer] Missing LDFLAGS cause FTBFS on Mageia 2 / Mandriva 2011 +Patch0: kchmviewer-3.5.13-missing_ldflags.patch BuildRequires: tqtinterface-devel BuildRequires: trinity-kdelibs-devel @@ -67,8 +76,8 @@ support. Correctly detects and shows encoding of any valid chm file. # 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 "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" %__cp "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh" @@ -77,10 +86,15 @@ support. Correctly detects and shows encoding of any valid chm file. %build unset QTDIR || : ; . /etc/profile.d/qt.sh -export PATH="%{_bindir}:${PATH}" -export LDFLAGS="-L%{_libdir} -I%{_includedir}" +export PATH="%{tde_bindir}:${PATH}" +export LDFLAGS="-L%{tde_libdir} -I%{_includedir}" %configure \ + --prefix=%{tde_prefix} \ + --exec-prefix=%{tde_prefix} \ + --bindir=%{tde_bindir} \ + --libdir=%{tde_libdir} \ + --datadir=%{tde_datadir} \ --disable-rpath \ --with-x \ --with-kde \ @@ -92,36 +106,37 @@ export LDFLAGS="-L%{_libdir} -I%{_includedir}" %install -export PATH="%{_bindir}:${PATH}" +export PATH="%{tde_bindir}:${PATH}" %__rm -rf %{buildroot} %__make install DESTDIR=%{buildroot} %find_lang %{kdecomp} +# Removes useless files +%__rm -f %{?buildroot}%{tde_libdir}/*.a + %clean %__rm -rf %{buildroot} %post -touch --no-create %{_datadir}/icons/crystalsvg || : -gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || : +touch --no-create %{tde_datadir}/icons/crystalsvg || : +gtk-update-icon-cache --quiet %{tde_datadir}/icons/crystalsvg || : %postun -touch --no-create %{_datadir}/icons/crystalsvg || : -gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || : +touch --no-create %{tde_datadir}/icons/crystalsvg || : +gtk-update-icon-cache --quiet %{tde_datadir}/icons/crystalsvg || : %files -f %{kdecomp}.lang %defattr(-,root,root,-) %doc ChangeLog COPYING FAQ README -%{_bindir}/kchmviewer -%exclude %{_libdir}/libchmfile.a -%exclude %{_libdir}/libkdeextra.a -%{tde_libdir}/kio_msits.la -%{tde_libdir}/kio_msits.so -%{_datadir}/applnk/kchmviewer.desktop -%{_datadir}/icons/crystalsvg/*/apps/kchmviewer.png -%{_datadir}/services/msits.protocol +%{tde_bindir}/kchmviewer +%{tde_tdelibdir}/kio_msits.la +%{tde_tdelibdir}/kio_msits.so +%{tde_datadir}/applnk/kchmviewer.desktop +%{tde_datadir}/icons/crystalsvg/*/apps/kchmviewer.png +%{tde_datadir}/services/msits.protocol %Changelog |