RPM: switch k9copy to cmake build

Signed-off-by: François Andriot <albator78@libertysurf.fr>
r14.1.x
François Andriot 10 months ago
parent fde218b082
commit 3ad9043330

@ -63,7 +63,7 @@ BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: trinity-k3b-devel BuildRequires: trinity-k3b-devel
BuildRequires: autoconf automake libtool m4 BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
@ -129,38 +129,43 @@ This is the Trinity version.
# Fix permissions on doc files # Fix permissions on doc files
chmod -x AUTHORS COPYING chmod -x AUTHORS COPYING
%__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 %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"
# FFMPEG ... # FFMPEG ...
if [ -d /usr/include/ffmpeg ]; then if [ -d /usr/include/ffmpeg ]; then
export CXXFLAGS="${RPM_OPT_FLAGS} -I/usr/include/ffmpeg" RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I/usr/include/ffmpeg"
fi
if ! rpm -E %%cmake|grep -q "cd build"; then
%__mkdir_p build
cd build
fi fi
# NOTICE: --enable-final causes FTBFS ! %cmake \
%configure \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
--prefix=%{tde_prefix} \ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
--exec-prefix=%{tde_prefix} \ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
--bindir=%{tde_bindir} \ -DCMAKE_SKIP_RPATH=OFF \
--datadir=%{tde_datadir} \ -DCMAKE_SKIP_INSTALL_RPATH=OFF \
--includedir=%{tde_tdeincludedir} \ -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
--mandir=%{tde_mandir} \ -DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_GCC_VISIBILITY=OFF \
\
-DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
-DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
-DINCLUDE_INSTALL_DIR="%{tde_includedir}" \
-DLIB_INSTALL_DIR="%{tde_libdir}" \
\ \
--disable-dependency-tracking \ -DWITH_ALL_OPTIONS=ON \
--disable-debug \ -DWITH_GCC_VISIBILITY=ON \
--disable-final \
--enable-new-ldflags \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility \
\ \
--enable-k3bdevices -DBUILD_ALL=ON \
-DWITH_ALL_OPTIONS=ON \
..
%__make %{?_smp_mflags} || %__make %__make %{?_smp_mflags} || %__make
@ -168,7 +173,7 @@ fi
%install %install
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot} %__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot} %__make -C build install DESTDIR=%{buildroot}
%find_lang %{tde_pkg} %find_lang %{tde_pkg}

Loading…
Cancel
Save