From 9c1c2e0c6838c669cf46654763f3fb6071d18c91235f788b8f22c5f6389e39c1 Mon Sep 17 00:00:00 2001 From: James McDonough Date: Fri, 6 Oct 2017 09:22:06 +0000 Subject: [PATCH] Accepting request 532142 from home:jengelh:branches:network:samba:STABLE rebase + sp4 compile test OBS-URL: https://build.opensuse.org/request/show/532142 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/ldb?expand=0&rev=114 --- ldb.changes | 8 +++++++ ldb.spec | 63 ++++++++++++++--------------------------------------- 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/ldb.changes b/ldb.changes index 6d4ab67..4640b9d 100644 --- a/ldb.changes +++ b/ldb.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Oct 2 12:18:30 UTC 2017 - jengelh@inai.de + +- Remove %if guards for blocks that do not affect the build result. + Fix RPM groups and summaries. + Drop very old SUSE support. Replace old RPM macros by new + constructs. + ------------------------------------------------------------------- Mon Sep 18 12:17:31 UTC 2017 - scabrero@suse.com diff --git a/ldb.spec b/ldb.spec index 969c656..4d532fc 100644 --- a/ldb.spec +++ b/ldb.spec @@ -51,17 +51,12 @@ BuildRequires: python3-talloc-devel >= %{talloc_version} %else BuildRequires: python-talloc-devel >= %{talloc_version} %endif -%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140 -%define build_make_smp_mflags %{?_smp_mflags} -%else -%define build_make_smp_mflags %{?jobs:-j%jobs} -%endif Url: https://ldb.samba.org/ Version: 1.2.2 Release: 0 Summary: An LDAP-like embedded database License: GPL-3.0+ -Group: System/Libraries +Group: Development/Libraries/C and C++ Source: https://download.samba.org/pub/ldb/ldb-%{version}.tar.gz Source1: https://download.samba.org/pub/ldb/ldb-%{version}.tar.asc Source2: ldb.keyring @@ -70,16 +65,15 @@ Patch0: ldb-python3.5-fix-soabi_name.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Ldb is an LDAP-like embedded database. +LDB is an LDAP-like embedded database. %package -n libldb1 Summary: An LDAP-like embedded database Group: System/Libraries -PreReq: /sbin/ldconfig %description -n libldb1 -Ldb is an LDAP-like embedded database. +LDB is an LDAP-like embedded database. This package includes the ldb1 library. @@ -88,47 +82,38 @@ This package includes the ldb1 library. Summary: Libraries and Header Files to Develop Programs with ldb1 Support Group: Development/Libraries/C and C++ Requires: libldb1 = %{version} -%if 0%{?suse_version} > 1020 Requires: pkg-config -%else -Requires: pkgconfig -%endif %description -n libldb-devel -Ldb is an LDAP-like embedded database. +LDB is an LDAP-like embedded database. -Libraries and Header Files to Develop Programs with ldb1 Support +Libraries and Header Files to Develop Programs with ldb1 Support. %package -n ldb-tools -Summary: Tools to manipulate ldb files +Summary: Tools to manipulate LDB files Group: Development/Libraries/C and C++ %description -n ldb-tools -Tools to manipulate ldb files +Tools to manipulate LDB files. %package -n python-ldb Summary: Python bindings for the LDB library Group: Development/Libraries/Python Requires: libldb1 = %{version} -PreReq: /sbin/ldconfig Provides: pyldb = %{version} Obsoletes: pyldb < %{version} %description -n python-ldb -This package contains the python bindings for the LDB library. +This package contains the Python bindings for the LDB library. %package -n python-ldb-devel Summary: Development files for the Python bindings for the LDB library Group: Development/Libraries/Python -Requires: python-ldb = %{version} -%if 0%{?suse_version} > 1020 Requires: pkg-config -%else -Requires: pkgconfig -%endif +Requires: python-ldb = %{version} Provides: pyldb-devel = %{version} Obsoletes: pyldb-devel < %{version} Conflicts: python3-ldb-devel @@ -137,13 +122,10 @@ Conflicts: python3-ldb-devel This package contains the development files for the Python bindings for the LDB library. - -%if %{with_python3} %package -n python3-ldb Summary: Python3 bindings for the LDB library Group: Development/Libraries/Python Requires: libldb1 = %{version} -PreReq: /sbin/ldconfig %description -n python3-ldb This package contains the python3 bindings for the LDB library. @@ -151,34 +133,23 @@ This package contains the python3 bindings for the LDB library. %package -n python3-ldb-devel Summary: Development files for the Python3 bindings for the LDB library Group: Development/Libraries/Python -Requires: python3-ldb = %{version} -%if 0%{?suse_version} > 1020 Requires: pkg-config -%else -Requires: pkgconfig -%endif +Requires: python3-ldb = %{version} Conflicts: python-ldb-devel %description -n python3-ldb-devel This package contains the development files for the Python bindings for the LDB library. -%endif %prep %setup -n ldb-%{version} -q %patch0 -p1 %build -%if 0%{?suse_version} && 0%{?suse_version} < 911 - OPTIMIZATION="-O" -%else - # use the default optimization - unset OPTIMIZATION -%endif %if 0%{?suse_version} > 1110 export SUSE_ASNEEDED=0 %endif - +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" %define bundled_libs cmocka %if 0%{?suse_version} > 1320 %ifnarch ppc @@ -186,7 +157,7 @@ LDB library. %endif %endif -export CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS" CONFIGURE_OPTIONS="\ --prefix=%{_prefix} \ --libdir=%{_libdir} \ @@ -201,7 +172,7 @@ CONFIGURE_OPTIONS="\ %endif " ./configure ${CONFIGURE_OPTIONS} -%{__make} %{build_make_smp_mflags} \ +make %{?_smp_mflags} \ all doxygen Doxyfile # remove man page with bogus full build dir in path @@ -211,14 +182,14 @@ rm -f apidocs/man/man3/_*_ldb-%{version}_include_.3 %ifnarch ppc64 s390x LD_LIBRARY_PATH="bin/shared:bin/shared/private" \ LDB_MODULES_PATH="bin/modules" \ -%{__make} test +make test %endif %install -DESTDIR=${RPM_BUILD_ROOT} make install +%make_install # Install API documentation -cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir} +cp -a apidocs/man/* %{buildroot}/%{_mandir} %post -n libldb1 -p /sbin/ldconfig @@ -228,11 +199,9 @@ cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir} %postun -n python-ldb -p /sbin/ldconfig -%if %{with_python3} %post -n python3-ldb -p /sbin/ldconfig %postun -n python3-ldb -p /sbin/ldconfig -%endif %files -n libldb1 %defattr(-,root,root)