| |
@@ -1,93 +1,82 @@
|
| |
%if 0%{?fedora} || 0%{?rhel} > 7
|
| |
- %global with_python3 1
|
| |
- %else
|
| |
- %global with_python3 0
|
| |
+ %bcond_without python3
|
| |
%endif
|
| |
|
| |
- Name: libtdb
|
| |
- Version: 1.3.15
|
| |
- Release: 2%{?dist}
|
| |
- Summary: The tdb library
|
| |
- License: LGPLv3+
|
| |
- URL: http://tdb.samba.org/
|
| |
- Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
|
| |
-
|
| |
- BuildRequires: libxslt
|
| |
- BuildRequires: docbook-style-xsl
|
| |
- BuildRequires: python2-devel
|
| |
- %if 0%{?with_python3}
|
| |
+ Summary: The tdb library
|
| |
+ Name: libtdb
|
| |
+ Version: 1.3.15
|
| |
+ Release: 3%{?dist}
|
| |
+ License: LGPLv3+
|
| |
+ URL: http://tdb.samba.org/
|
| |
+ Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
|
| |
+ BuildRequires: docbook-style-xsl
|
| |
+ BuildRequires: libxslt
|
| |
+ BuildRequires: pkgconfig
|
| |
+ BuildRequires: python2-devel
|
| |
+ %if %{with python3}
|
| |
BuildRequires: python3-devel
|
| |
%endif
|
| |
-
|
| |
Provides: bundled(libreplace)
|
| |
-
|
| |
# Patches
|
| |
|
| |
%description
|
| |
A library that implements a trivial database.
|
| |
|
| |
%package devel
|
| |
- Summary: Header files need to link the Tdb library
|
| |
- Requires: libtdb = %{version}-%{release}
|
| |
- Requires: pkgconfig
|
| |
+ Summary: Header files need to link the Tdb library
|
| |
+ Requires: libtdb = %{version}-%{release}
|
| |
|
| |
%description devel
|
| |
- Header files needed to develop programs that link against the Tdb library.
|
| |
+ Header files needed to develop programs that link against the Tdb
|
| |
+ library.
|
| |
|
| |
%package -n tdb-tools
|
| |
- Summary: Developer tools for the Tdb library
|
| |
- Requires: libtdb = %{version}-%{release}
|
| |
+ Summary: Developer tools for the Tdb library
|
| |
+ Requires: libtdb = %{version}-%{release}
|
| |
|
| |
%description -n tdb-tools
|
| |
- Tools to manage Tdb files
|
| |
+ Tools to manage Tdb files.
|
| |
|
| |
%package -n python2-tdb
|
| |
- Summary: Python bindings for the Tdb library
|
| |
- Requires: libtdb = %{version}-%{release}
|
| |
+ Summary: Python bindings for the Tdb library
|
| |
+ Requires: libtdb = %{version}-%{release}
|
| |
%{?python_provide:%python_provide python2-tdb}
|
| |
|
| |
%description -n python2-tdb
|
| |
- Python bindings for libtdb
|
| |
+ Python bindings for libtdb.
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
%package -n python3-tdb
|
| |
- Summary: Python3 bindings for the Tdb library
|
| |
- Requires: libtdb = %{version}-%{release}
|
| |
+ Summary: Python3 bindings for the Tdb library
|
| |
+ Requires: libtdb = %{version}-%{release}
|
| |
%{?python_provide:%python_provide python3-tdb}
|
| |
|
| |
%description -n python3-tdb
|
| |
- Python3 bindings for libtdb
|
| |
- %endif
|
| |
+ Python3 bindings for libtdb.
|
| |
|
| |
%prep
|
| |
- %setup -q -n tdb-%{version}
|
| |
+ %autosetup -p1 -n tdb-%{version}
|
| |
|
| |
%build
|
| |
- %if 0%{?with_python3}
|
| |
- PY3_CONFIG_FLAGS=--extra-python=%{__python3}
|
| |
- %else
|
| |
- PY3_CONFIG_FLAGS=""
|
| |
- %endif
|
| |
-
|
| |
- %configure --disable-rpath \
|
| |
- --bundled-libraries=NONE \
|
| |
- --builtin-libraries=replace \
|
| |
- $PY3_CONFIG_FLAGS
|
| |
-
|
| |
- make %{?_smp_mflags} V=1
|
| |
-
|
| |
- %check
|
| |
- make %{?_smp_mflags} check
|
| |
+ %configure \
|
| |
+ --bundled-libraries=NONE \
|
| |
+ --builtin-libraries=replace \
|
| |
+ --disable-rpath \
|
| |
+ %{?with_python3:--extra-python=%{__python3}} \
|
| |
+ %{nil}
|
| |
+ %{make_build}
|
| |
|
| |
%install
|
| |
-
|
| |
- make install DESTDIR=$RPM_BUILD_ROOT
|
| |
+ %{make_install}
|
| |
|
| |
# Shared libraries need to be marked executable for
|
| |
# rpmbuild to strip them and include them in debuginfo
|
| |
- find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
|
| |
+ find %{buildroot} -name "*.so*" -exec chmod -c +x {} \;
|
| |
|
| |
- rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.a
|
| |
+ %check
|
| |
+ %{make_build} check
|
| |
+
|
| |
+ %post -p /sbin/ldconfig
|
| |
+ %postun -p /sbin/ldconfig
|
| |
|
| |
%files
|
| |
%{_libdir}/libtdb.so.*
|
| |
@@ -99,41 +88,33 @@
|
| |
%{_libdir}/pkgconfig/tdb.pc
|
| |
|
| |
%files -n tdb-tools
|
| |
- %{_bindir}/tdbbackup
|
| |
- %{_bindir}/tdbdump
|
| |
- %{_bindir}/tdbtool
|
| |
- %{_bindir}/tdbrestore
|
| |
- %{_mandir}/man8/tdbbackup.8*
|
| |
- %{_mandir}/man8/tdbdump.8*
|
| |
- %{_mandir}/man8/tdbtool.8*
|
| |
- %{_mandir}/man8/tdbrestore.8*
|
| |
+ %{_bindir}/*
|
| |
+ %{_mandir}/man8/*
|
| |
|
| |
%files -n python2-tdb
|
| |
%{python_sitearch}/tdb.so
|
| |
%{python_sitearch}/_tdb_text.py*
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
%files -n python3-tdb
|
| |
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
|
| |
%{python3_sitearch}/tdb.cpython*.so
|
| |
%{python3_sitearch}/_tdb_text.py
|
| |
%endif
|
| |
|
| |
- %post -p /sbin/ldconfig
|
| |
-
|
| |
- %postun -p /sbin/ldconfig
|
| |
-
|
| |
- %post -n python2-tdb -p /sbin/ldconfig
|
| |
-
|
| |
- %postun -n python2-tdb -p /sbin/ldconfig
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- %post -n python3-tdb -p /sbin/ldconfig
|
| |
-
|
| |
- %postun -n python3-tdb -p /sbin/ldconfig
|
| |
- %endif
|
| |
-
|
| |
%changelog
|
| |
+ * Mon Jan 08 2018 Tomasz Kłoczko <kloczek@fedoraproject.org> - 1.3.15-3
|
| |
+ - remove pkgconfig from devel Requires (provide .pc file does not mean that package
|
| |
+ requires pkgconfig)
|
| |
+ - added pkgconfig to BuildRequires
|
| |
+ - executing /sbin/ldconfig in python %%post/%%postun packages is not needed
|
| |
+ (those packages are not providing libraries but loadable modules)
|
| |
+ - remove not needed %%ifing
|
| |
+ - use %%bcond instead %%global
|
| |
+ - removed delete static libtdb.a in %%install (is not needed)
|
| |
+ - added use more macros (%%autosetup, %%{make_build} and %{make_install})
|
| |
+ - indent spec
|
| |
+
|
| |
* Thu Nov 30 2017 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.3.15-2
|
| |
- Update spec file conditionals
|
| |
|
| |
Copy of the changelog:
* Mon Jan 08 2018 Tomasz Kłoczko kloczek@fedoraproject.org - 1.3.15-3
- remove pkgconfig from devel Requires (provide .pc file does not mean that package
requires pkgconfig)
- added pkgconfig to BuildRequires
- executing /sbin/ldconfig in python %%post/%%postun packages is not needed
(those packages are not providing libraries but loadable modules)
- remove not needed %%ifing
- use %%bcond instead %%global
- removed delete static libtdb.a in %%install (is not needed)
- added use more macros (%%autosetup, %%{make_build} and %{make_install})
- indent spec