RPM: switch ksystemlog to cmake build

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

@ -60,7 +60,7 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version} BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: autoconf automake libtool m4 BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: fdupes BuildRequires: fdupes
@ -97,39 +97,45 @@ quickly see problems occuring on their server.
%prep %prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} %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 %build
unset QTDIR QTINC QTLIB unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
%configure \
--prefix=%{tde_prefix} \ if ! rpm -E %%cmake|grep -q "cd build"; then
--exec-prefix=%{tde_prefix} \ %__mkdir_p build
--bindir=%{tde_bindir} \ cd build
--datadir=%{tde_datadir} \ fi
--libdir=%{tde_libdir} \
--mandir=%{tde_mandir} \ # Warning: GCC visibility causes FTBFS [Bug #1285]
--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_INSTALL_RPATH="%{tde_libdir}" \
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_GCC_VISIBILITY=OFF \
\ \
--disable-dependency-tracking \ -DBIN_INSTALL_DIR=%{tde_bindir} \
--disable-debug \ -DCONFIG_INSTALL_DIR="%{tde_confdir}" \
--enable-new-ldflags \ -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
--enable-final \ -DLIB_INSTALL_DIR=%{tde_libdir} \
--enable-closure \ -DSHARE_INSTALL_PREFIX=%{tde_datadir} \
--enable-rpath \ \
--disable-gcc-hidden-visibility -DWITH_ALL_OPTIONS=ON \
-DBUILD_ALL=ON \
..
%__make %{?_smp_mflags} %__make %{?_smp_mflags} || %__make
%install %install
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot} %__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot} %__make install DESTDIR=%{buildroot} -C build
# Missing category will make this fail. # Missing category will make this fail.
echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{tde_tdeappdir}/%{tde_pkg}.desktop" echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{tde_tdeappdir}/%{tde_pkg}.desktop"
@ -151,5 +157,7 @@ echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{tde_tdeappdir}/%{tde_pkg}.desktop"
%{tde_datadir}/icons/hicolor/*/apps/ksystemlog.png %{tde_datadir}/icons/hicolor/*/apps/ksystemlog.png
%{tde_datadir}/icons/hicolor/*/apps/ksystemlog.svgz %{tde_datadir}/icons/hicolor/*/apps/ksystemlog.svgz
%{tde_tdedocdir}/HTML/en/ksystemlog/ %{tde_tdedocdir}/HTML/en/ksystemlog/
%{tde_mandir}/man1/ksystemlog.1*
%changelog %changelog

Loading…
Cancel
Save