diff --git a/ldb.spec b/ldb.spec index 4c8d044..969c656 100644 --- a/ldb.spec +++ b/ldb.spec @@ -31,7 +31,11 @@ Name: ldb BuildRequires: docbook-xsl-stylesheets BuildRequires: doxygen +%if 0%{?suse_version} > 1320 +%ifnarch ppc BuildRequires: libcmocka-devel >= 1.1.1 +%endif +%endif BuildRequires: libtalloc-devel >= %{talloc_version} BuildRequires: libtdb-devel >= %{tdb_version} BuildRequires: libtevent-devel >= %{tevent_version} @@ -174,6 +178,14 @@ LDB library. %if 0%{?suse_version} > 1110 export SUSE_ASNEEDED=0 %endif + +%define bundled_libs cmocka +%if 0%{?suse_version} > 1320 +%ifnarch ppc + %define bundled_libs NONE +%endif +%endif + export CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" CONFIGURE_OPTIONS="\ --prefix=%{_prefix} \ @@ -182,7 +194,7 @@ CONFIGURE_OPTIONS="\ --disable-rpath-install \ --disable-silent-rules \ --with-modulesdir=%{_libdir} \ - --bundled-libraries=NONE \ + --bundled-libraries=%{bundled_libs} \ --builtin-libraries=replace \ %if %{with_python3} --extra-python=/usr/bin/python3 \ @@ -234,6 +246,12 @@ cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir} %{_libdir}/ldb/server_sort.so %{_libdir}/ldb/skel.so %{_libdir}/ldb/tdb.so +%if 0%{?suse_version} <= 1320 +%{_libdir}/ldb/libcmocka-ldb.so +%endif +%ifarch ppc +%{_libdir}/ldb/libcmocka-ldb.so +%endif %files -n libldb-devel %defattr(-,root,root)