summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFran├žois Andriot <albator78@libertysurf.fr>2020-09-07 21:01:38 +0200
committerFran├žois Andriot <albator78@libertysurf.fr>2020-09-07 21:02:08 +0200
commit1c5193fd8476d889638e294c67031d61b177a5d0 (patch)
tree77e8b0f2714f8d5481a658bb99631901d5524798
parent788ca09216c3017ee12f7c4d1ed28508aa9e590a (diff)
downloadtde-packaging-r14.0.x.tar.gz
tde-packaging-r14.0.x.zip
RPM: switch libtdeldap to cmake buildr14.0.x
-rw-r--r--redhat/libraries/libtdeldap/libtdeldap.spec66
1 files changed, 31 insertions, 35 deletions
diff --git a/redhat/libraries/libtdeldap/libtdeldap.spec b/redhat/libraries/libtdeldap/libtdeldap.spec
index da2f61341..c0531146c 100644
--- a/redhat/libraries/libtdeldap/libtdeldap.spec
+++ b/redhat/libraries/libtdeldap/libtdeldap.spec
@@ -64,9 +64,11 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: gcc-c++
+BuildRequires: cmake >= 2.8
+BuildRequires: pkgconfig
-# AUTOTOOLS
-BuildRequires: automake autoconf libtool
+# LIBTOOL
+BuildRequires: automake
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}ltdl-devel
%endif
@@ -163,54 +165,48 @@ libtdeldap-trinity-dev contains development files and documentation.
%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"
-extra_includes="%{_includedir}"
-extra_libs="%{_libdir}"
-
-if [ -d "%{_includedir}/openldap24" ]; then
- extra_includes="%{_includedir}/openldap24:${extra_includes}"
- extra_libs="%{_libdir}/openldap24:${extra_libs}"
+if ! rpm -E %%cmake|grep -q "cd build"; then
+ %__mkdir_p build
+ cd build
fi
-#if [ -d "%{_includedir}/heimdal" ]; then
-# extra_includes="%{_includedir}/heimdal:${extra_includes}"
-# extra_libs="%{_libdir}/heimdal:${extra_libs}"
-#fi
-
-%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} -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}" \
+ -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
+ -DPLUGIN_INSTALL_DIR="%{tde_tdelibdir}" \
+ \
+ -DWITH_ALL_OPTIONS=ON \
+ -DWITH_GCC_VISIBILITY=ON \
\
- --disable-dependency-tracking \
- --disable-debug \
- --enable-new-ldflags \
- --enable-final \
- --enable-closure \
- --enable-rpath \
- --disable-gcc-hidden-visibility \
+ -DBUILD_ALL=ON \
+ -DBUILD_DOC=ON \
+ -DBUILD_TRANSLATIONS=ON \
\
- --with-extra-includes=${extra_includes} \
- --with-extra-libs=${extra_libs} \
+ ..
-%__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
%clean