RPM: tdewebdev: switch to cmake build

Signed-off-by: François Andriot <albator78@libertysurf.fr>
pull/158/head
François Andriot 3 years ago
parent b4c0c8a0cd
commit 02e2573032

@ -31,6 +31,7 @@
%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_tdeappdir %{tde_datadir}/applications/tde
%define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde
@ -67,7 +68,7 @@ Source10: %{name}-rpmlintrc
BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdesdk-devel >= %{tde_version}
BuildRequires: autoconf automake libtool m4
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
@ -168,6 +169,7 @@ This package is part of TDE, as a component of the TDE web development module.
%{tde_datadir}/services/quanta_preview_config.desktop
%{tde_datadir}/servicetypes/quantadebugger.desktop
%{tde_tdedocdir}/HTML/en/quanta/
%{tde_mandir}/man1/quanta.1*
##########
@ -212,6 +214,7 @@ This package is part of TDE, as a component of the TDE web development module.
%{tde_datadir}/icons/locolor/*/apps/kimagemapeditor.png
%{tde_datadir}/services/kimagemapeditorpart.desktop
%{tde_tdedocdir}/HTML/en/kimagemapeditor/
%{tde_mandir}/man1/kimagemapeditor.1*
##########
@ -241,6 +244,7 @@ This package is part of TDE, as a component of the TDE web development module.
%{tde_datadir}/icons/hicolor/*/apps/klinkstatus.png
%{tde_datadir}/services/klinkstatus_part.desktop
%{tde_tdedocdir}/HTML/en/klinkstatus/
%{tde_mandir}/man1/klinkstatus.1*
##########
@ -293,6 +297,11 @@ This package is part of TDE, as a component of the TDE web development module.
%{tde_datadir}/apps/katepart/syntax/kommander-new.xml
%{tde_datadir}/apps/tdevappwizard/
%{tde_datadir}/services/kommander_part.desktop
%{tde_mandir}/man1/extractkmdr.1*
%{tde_mandir}/man1/kmdr-editor.1*
%{tde_mandir}/man1/kmdr-executor.1*
%{tde_mandir}/man1/kmdr-plugins.1*
%{tde_mandir}/man1/kmdr2po.1*
##########
@ -366,6 +375,7 @@ This package is part of TDE, as a component of the TDE web development module.
%{tde_datadir}/icons/hicolor/*/apps/kxsldbg.png
%{tde_datadir}/icons/locolor/*/apps/kxsldbg.png
%{tde_datadir}/services/kxsldbg_part.desktop
%{tde_mandir}/man1/kxsldbg.1*
%endif
@ -401,6 +411,7 @@ This package is part of Trinity, as a component of the TDE utilities module.
%{tde_tdedocdir}/HTML/en/tdefilereplace/
%{tde_datadir}/icons/hicolor/*/apps/tdefilereplace.png
%{tde_datadir}/services/tdefilereplacepart.desktop
%{tde_mandir}/man1/tdefilereplace.1*
%endif
@ -437,46 +448,41 @@ Requires: trinity-kommander-devel = %{?epoch:%{epoch}:}%{version}-%{release}
%__rm -rf kxsldbg/ doc/kxsldbg/ doc/xsldbg/
%endif
%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"
%build
unset QTDIR QTINC QTLIB
unset QTDIR QTLIB QTINC
export PATH="%{tde_bindir}:${PATH}"
# 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: GCC visibility causes FTBFS [Bug #1285]
%configure \
--prefix=%{tde_prefix} \
--exec-prefix=%{tde_prefix} \
--bindir=%{tde_bindir} \
--datadir=%{tde_datadir} \
--libdir=%{tde_libdir} \
--includedir=%{tde_tdeincludedir} \
%cmake \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_SKIP_INSTALL_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_GCC_VISIBILITY=OFF \
\
--disable-dependency-tracking \
--disable-debug \
--enable-new-ldflags \
--enable-final \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility \
-DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
-DBIN_INSTALL_DIR="%{tde_bindir}" \
-DDOC_INSTALL_DIR="%{tde_docdir}" \
-DINCLUDE_INSTALL_DIR="%{tde_tdeincludedir}" \
-DLIB_INSTALL_DIR="%{tde_libdir}" \
-DPKGCONFIG_INSTALL_DIR="%{tde_libdir}/pkgconfig" \
-DSYSCONF_INSTALL_DIR="%{_sysconfdir}/trinity" \
-DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
\
--enable-editors \
--with-extra-includes=%{_includedir}/tqt
# WTF hack for RHEL4
%if 0%{?rhel} == 4
mkdir kommander/plugin/.libs/
ln -s . kommander/plugin/.libs/.libs
%endif
-DWITH_ALL_OPTIONS=ON \
-DWITH_QUANTA_CVSSERVICE=OFF \
\
-DBUILD_ALL=ON \
\
..
%__make %{?_smp_mflags} || %__make
@ -484,7 +490,7 @@ ln -s . kommander/plugin/.libs/.libs
%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{?buildroot}
%__make install DESTDIR=%{?buildroot}
%__make install DESTDIR=%{?buildroot} -C build
## package separately? Why doesn't upstream include this? -- Rex

Loading…
Cancel
Save