RPM: switch libtdeldap to cmake build

pull/92/head
François Andriot 4 years ago
parent 788ca09216
commit 1c5193fd84

@ -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

Loading…
Cancel
Save