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: desktop-file-utils
BuildRequires: gettext BuildRequires: gettext
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: cmake >= 2.8
BuildRequires: pkgconfig
# AUTOTOOLS # LIBTOOL
BuildRequires: automake autoconf libtool BuildRequires: automake
%if 0%{?mgaversion} || 0%{?mdkversion} %if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}ltdl-devel BuildRequires: %{_lib}ltdl-devel
%endif %endif
@ -163,54 +165,48 @@ libtdeldap-trinity-dev contains development files and documentation.
%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"
extra_includes="%{_includedir}" if ! rpm -E %%cmake|grep -q "cd build"; then
extra_libs="%{_libdir}" %__mkdir_p build
cd build
if [ -d "%{_includedir}/openldap24" ]; then
extra_includes="%{_includedir}/openldap24:${extra_includes}"
extra_libs="%{_libdir}/openldap24:${extra_libs}"
fi fi
#if [ -d "%{_includedir}/heimdal" ]; then %cmake \
# extra_includes="%{_includedir}/heimdal:${extra_includes}" -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
# extra_libs="%{_libdir}/heimdal:${extra_libs}" -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
#fi -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
-DCMAKE_SKIP_RPATH=OFF \
%configure \ -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
--prefix=%{tde_prefix} \ -DCMAKE_VERBOSE_MAKEFILE=ON \
--exec-prefix=%{tde_prefix} \ -DWITH_GCC_VISIBILITY=OFF \
--bindir=%{tde_bindir} \ \
--datadir=%{tde_datadir} \ -DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
--libdir=%{tde_libdir} \ -DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
--includedir=%{tde_tdeincludedir} \ -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 \ -DBUILD_ALL=ON \
--disable-debug \ -DBUILD_DOC=ON \
--enable-new-ldflags \ -DBUILD_TRANSLATIONS=ON \
--enable-final \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility \
\ \
--with-extra-includes=${extra_includes} \ ..
--with-extra-libs=${extra_libs} \
%__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
%clean %clean

Loading…
Cancel
Save