summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kchmviewer
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/applications/kchmviewer')
-rw-r--r--redhat/applications/kchmviewer/kchmviewer.spec (renamed from redhat/applications/kchmviewer/kchmviewer-14.0.0.spec)62
1 files changed, 34 insertions, 28 deletions
diff --git a/redhat/applications/kchmviewer/kchmviewer-14.0.0.spec b/redhat/applications/kchmviewer/kchmviewer.spec
index dca19c1d4..277a3e96f 100644
--- a/redhat/applications/kchmviewer/kchmviewer-14.0.0.spec
+++ b/redhat/applications/kchmviewer/kchmviewer.spec
@@ -18,7 +18,7 @@
# TDE variables
%define tde_epoch 2
%if "%{?tde_version}" == ""
-%define tde_version 14.0.0
+%define tde_version 14.0.7
%endif
%define tde_pkg kchmviewer
%define tde_prefix /opt/trinity
@@ -61,7 +61,7 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils
-BuildRequires: autoconf automake libtool m4
+BuildRequires: cmake >= 2.8
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@@ -76,7 +76,12 @@ BuildRequires: brp-check-trinity
%endif
# CHMLIB support
+%if 0%{?rhel} == 8
+%define with_chmlib 0
+%else
+%define with_chmlib 1
BuildRequires: chmlib-devel
+%endif
%description
@@ -112,47 +117,47 @@ support. Correctly detects and shows encoding of any valid chm file.
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
-%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
-%__cp "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
-%__make -f "admin/Makefile.common"
-
%build
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
+export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
-# Specific path for RHEL4
-if [ -d /usr/X11R6 ]; then
- export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I/usr/X11R6/include -L/usr/X11R6/%{_lib}"
+if ! rpm -E %%cmake|grep -q "cd build"; then
+ %__mkdir_p build
+ cd build
fi
-# Warning: --enable-final causes FTBFS !
-%configure \
- --prefix=%{tde_prefix} \
- --exec-prefix=%{tde_prefix} \
- --bindir=%{tde_bindir} \
- --libdir=%{tde_libdir} \
- --datadir=%{tde_datadir} \
- --includedir=%{tde_tdeincludedir} \
+%cmake \
+ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
+ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=OFF \
+ \
+ -DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
+ -DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
+ -DLIB_INSTALL_DIR="%{tde_libdir}" \
+ -DPLUGIN_INSTALL_DIR="%{tde_tdelibdir}" \
\
- --disable-dependency-tracking \
- --disable-debug \
- --enable-new-ldflags \
- --disable-final \
- --enable-closure \
- --enable-rpath \
- --disable-gcc-hidden-visibility \
+ -DWITH_ALL_OPTIONS=ON \
+ -DWITH_GCC_VISIBILITY=ON \
+ -DWITH_CHMLIB=%{?with_chmlib} \
\
- --with-x \
- --with-kde
+ -DBUILD_ALL=ON \
+ -DBUILD_DOC=ON \
+ -DBUILD_TRANSLATIONS=ON \
+ ..
-%__make %{?_smp_mflags}
+%__make %{?_smp_mflags} || %__make
%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot}
-%__make install DESTDIR=%{buildroot}
+%__make install DESTDIR=%{buildroot} -C build
%find_lang %{tde_pkg}
@@ -185,6 +190,7 @@ echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{tde_tdeappdir}/kchmviewer.desktop"
%{tde_datadir}/services/msits.protocol
%{tde_tdedocdir}/HTML/en/kchmviewer/
%{tde_tdedocdir}/HTML/en/tdeioslave/msits/
+%{tde_mandir}/man1/kchmviewer.*
%changelog