2012-05-30 17:35:29 +02:00
|
|
|
#
|
2012-06-28 10:51:26 +02:00
|
|
|
# spec file for package tdb
|
2012-05-30 17:35:29 +02:00
|
|
|
#
|
2015-06-27 22:09:28 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-05-30 17:35:29 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2012-05-30 20:11:24 +02:00
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
2015-10-25 16:03:17 +01:00
|
|
|
%{!?py3_soflags: %global py3_soflags cpython-%{python3_version_nodots}m}
|
|
|
|
%if 0%{?suse_version} > 1310 || 0%{?fedora_version} > 20
|
|
|
|
%define with_python3 1
|
|
|
|
%else
|
|
|
|
%define with_python3 0
|
|
|
|
%endif
|
2012-05-30 18:11:54 +02:00
|
|
|
|
2012-06-02 16:43:53 +02:00
|
|
|
Name: tdb
|
2012-05-30 17:35:29 +02:00
|
|
|
%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
|
2012-06-02 17:21:33 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
2015-10-30 16:06:02 +01:00
|
|
|
BuildRequires: doxygen
|
2012-06-02 17:21:33 +02:00
|
|
|
BuildRequires: libxslt
|
2014-05-23 22:11:37 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
%endif
|
2012-06-02 17:21:33 +02:00
|
|
|
BuildRequires: python-devel
|
2015-10-25 16:03:17 +01:00
|
|
|
%if %{with_python3}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
%endif
|
2012-05-30 17:35:29 +02:00
|
|
|
Url: http://tdb.samba.org/
|
2015-11-11 19:12:18 +01:00
|
|
|
Version: 1.3.8
|
2012-05-30 17:35:29 +02:00
|
|
|
Release: 0
|
2012-06-02 16:43:53 +02:00
|
|
|
Summary: Samba Trivial Database
|
2012-06-28 10:51:26 +02:00
|
|
|
License: GPL-3.0+
|
|
|
|
Group: System/Libraries
|
2014-11-06 14:32:51 +01:00
|
|
|
Source: http://download.samba.org/pub/tdb/tdb-%{version}.tar.gz
|
2012-06-02 20:42:48 +02:00
|
|
|
Source1: http://download.samba.org/pub/tdb/tdb-%{version}.tar.asc
|
2014-10-28 17:02:47 +01:00
|
|
|
Source2: tdb.keyring
|
2012-05-30 17:35:29 +02:00
|
|
|
Source4: baselibs.conf
|
2012-06-28 23:31:52 +02:00
|
|
|
Patch0: ignore-tdb1-run-transaction-expand.diff
|
2012-08-15 19:14:48 +02:00
|
|
|
Patch1: build_pie.patch
|
2012-05-30 17:35:29 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
TDB is a Trivial Database. In concept, it is very much like GDBM, and BSD's DB
|
|
|
|
except that it allows multiple simultaneous writers and uses locking
|
|
|
|
internally to keep writers from trampling on each other. TDB is also extremely
|
|
|
|
small.
|
|
|
|
|
2012-06-02 16:43:53 +02:00
|
|
|
|
2012-06-03 23:47:59 +02:00
|
|
|
%define libtdb_name libtdb1
|
|
|
|
%package -n %{libtdb_name}
|
2012-06-02 16:43:53 +02:00
|
|
|
Summary: Libraries and Header Files to Develop Programs with tdb1 Support
|
|
|
|
Group: System/Libraries
|
|
|
|
PreReq: /sbin/ldconfig
|
|
|
|
|
2012-06-03 23:47:59 +02:00
|
|
|
%description -n %{libtdb_name}
|
2012-06-02 16:43:53 +02:00
|
|
|
TDB is a Trivial Database. In concept, it is very much like GDBM, and BSD's DB
|
|
|
|
except that it allows multiple simultaneous writers and uses locking
|
|
|
|
internally to keep writers from trampling on each other. TDB is also extremely
|
|
|
|
small.
|
|
|
|
|
2012-05-30 17:35:29 +02:00
|
|
|
This package contains the tdb1 library.
|
|
|
|
|
|
|
|
|
2012-05-31 14:14:24 +02:00
|
|
|
%package -n libtdb-devel
|
2012-05-30 17:35:29 +02:00
|
|
|
Summary: Libraries and Header Files to Develop Programs with tdb1 Support
|
|
|
|
Group: Development/Libraries/C and C++
|
2012-06-03 23:47:59 +02:00
|
|
|
Requires: %{libtdb_name} = %{version}
|
2012-05-30 17:35:29 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
Requires: pkg-config
|
|
|
|
%else
|
|
|
|
Requires: pkgconfig
|
|
|
|
%endif
|
|
|
|
|
2012-05-31 14:14:24 +02:00
|
|
|
%description -n libtdb-devel
|
2012-05-30 17:35:29 +02:00
|
|
|
TDB is a Trivial Database. In concept, it is very much like GDBM, and BSD's DB
|
|
|
|
except that it allows multiple simultaneous writers and uses locking
|
|
|
|
internally to keep writers from trampling on each other. TDB is also extremely
|
|
|
|
small.
|
|
|
|
|
|
|
|
This package contains libraries and header files need for development.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n tdb-tools
|
|
|
|
Summary: Tools to manipulate tdb files
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n tdb-tools
|
|
|
|
TDB is a Trivial Database. In concept, it is very much like GDBM, and BSD's DB
|
|
|
|
except that it allows multiple simultaneous writers and uses locking
|
|
|
|
internally to keep writers from trampling on each other. TDB is also extremely
|
|
|
|
small.
|
|
|
|
|
|
|
|
This package contains tools to manage Tdb files.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python-tdb
|
|
|
|
Summary: Python bindings for the Tdb library
|
2012-06-02 16:43:53 +02:00
|
|
|
Group: Development/Libraries/Python
|
2012-06-03 23:47:59 +02:00
|
|
|
Requires: %{libtdb_name} = %{version}
|
2013-08-29 13:58:02 +02:00
|
|
|
PreReq: /sbin/ldconfig
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%description -n python-tdb
|
2012-06-02 16:43:53 +02:00
|
|
|
This package contains the python bindings for the Tdb library.
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
|
2015-10-25 16:03:17 +01:00
|
|
|
%if %{with_python3}
|
|
|
|
%package -n python3-tdb
|
|
|
|
Summary: Python3 bindings for the Tdb library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{libtdb_name} = %{version}
|
|
|
|
PreReq: /sbin/ldconfig
|
|
|
|
|
|
|
|
%description -n python3-tdb
|
|
|
|
This package contains the python3 bindings for the Tdb library.
|
|
|
|
%endif
|
|
|
|
|
2012-05-30 17:35:29 +02:00
|
|
|
%prep
|
|
|
|
%setup -n tdb-%{version} -q
|
2013-12-04 17:29:59 +01:00
|
|
|
%ifarch ppc ppc64 ppc64le
|
2012-06-28 23:31:52 +02:00
|
|
|
%patch0 -p1
|
2012-06-29 00:09:02 +02:00
|
|
|
%endif
|
2012-08-15 19:14:48 +02:00
|
|
|
%patch1 -p1
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 911
|
|
|
|
OPTIMIZATION="-O"
|
|
|
|
%else
|
|
|
|
# use the default optimization
|
|
|
|
unset OPTIMIZATION
|
|
|
|
%endif
|
|
|
|
export CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
|
|
|
CONFIGURE_OPTIONS="\
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--disable-rpath \
|
2015-10-30 16:06:02 +01:00
|
|
|
--disable-rpath-install \
|
|
|
|
--disable-silent-rules \
|
2012-05-30 17:35:29 +02:00
|
|
|
--bundled-libraries=NONE \
|
2015-10-25 16:03:17 +01:00
|
|
|
%if %{with_python3}
|
|
|
|
--extra-python=/usr/bin/python3 \
|
|
|
|
%endif
|
2012-05-30 17:35:29 +02:00
|
|
|
"
|
|
|
|
./configure ${CONFIGURE_OPTIONS}
|
|
|
|
%{__make} %{build_make_smp_mflags} \
|
|
|
|
all
|
2015-10-30 16:06:02 +01:00
|
|
|
doxygen doxy.config
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%check
|
2012-06-28 10:51:26 +02:00
|
|
|
%if 0%{!?qemu_user_space_build:1}
|
2012-05-30 17:35:29 +02:00
|
|
|
%{__make} test
|
2012-06-28 10:51:26 +02:00
|
|
|
%endif
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
DESTDIR=${RPM_BUILD_ROOT} make install
|
2015-10-30 16:06:02 +01:00
|
|
|
# Install API documentation
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man3/
|
|
|
|
cp -a docs/man/man3/tdb.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
|
2012-05-30 17:35:29 +02:00
|
|
|
|
2012-06-03 23:47:59 +02:00
|
|
|
%post -n %{libtdb_name} -p /sbin/ldconfig
|
2012-05-30 17:35:29 +02:00
|
|
|
|
2012-06-03 23:47:59 +02:00
|
|
|
%postun -n %{libtdb_name} -p /sbin/ldconfig
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%post -n python-tdb -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n python-tdb -p /sbin/ldconfig
|
|
|
|
|
2015-10-25 16:03:17 +01:00
|
|
|
%if %{with_python3}
|
|
|
|
%post -n python3-tdb -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n python3-tdb -p /sbin/ldconfig
|
|
|
|
%endif
|
|
|
|
|
2012-06-03 23:47:59 +02:00
|
|
|
%files -n %{libtdb_name}
|
2012-05-30 17:35:29 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libtdb.so.*
|
|
|
|
|
2012-05-31 14:14:24 +02:00
|
|
|
%files -n libtdb-devel
|
2012-05-30 17:35:29 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/tdb.h
|
|
|
|
%{_libdir}/libtdb.so
|
|
|
|
%{_libdir}/pkgconfig/tdb.pc
|
2015-10-30 16:06:02 +01:00
|
|
|
%{_mandir}/man3/tdb.3.*
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%files -n tdb-tools
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/tdbbackup
|
|
|
|
%{_bindir}/tdbdump
|
|
|
|
%{_bindir}/tdbrestore
|
|
|
|
%{_bindir}/tdbtool
|
2013-07-22 13:04:31 +02:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1100
|
2012-05-30 17:35:29 +02:00
|
|
|
%{_mandir}/man8/tdbbackup.8*
|
|
|
|
%{_mandir}/man8/tdbdump.8*
|
|
|
|
%{_mandir}/man8/tdbrestore.8*
|
|
|
|
%{_mandir}/man8/tdbtool.8*
|
2013-07-22 13:04:31 +02:00
|
|
|
%endif
|
2012-05-30 17:35:29 +02:00
|
|
|
|
|
|
|
%files -n python-tdb
|
2015-10-25 16:03:17 +01:00
|
|
|
%defattr(-,root,root)
|
2012-05-30 17:35:29 +02:00
|
|
|
%{python_sitearch}/tdb.so
|
2015-07-22 11:54:15 +02:00
|
|
|
%{python_sitearch}/_tdb_text.py*
|
2012-05-30 17:35:29 +02:00
|
|
|
|
2015-10-25 16:03:17 +01:00
|
|
|
%if %{with_python3}
|
|
|
|
%files -n python3-tdb
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{python3_sitearch}/tdb.%{py3_soflags}.so
|
|
|
|
%{python3_sitearch}/_tdb_text.py
|
2015-10-25 18:14:54 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 11 || 0%{?rhel_version} > 599
|
|
|
|
%{python3_sitearch}/__pycache__/_tdb_text.cpython-*.py[co]
|
|
|
|
%endif
|
2015-10-25 16:03:17 +01:00
|
|
|
%endif
|
|
|
|
|
2012-05-30 17:35:29 +02:00
|
|
|
%changelog
|