Accepting request 800334 from home:dimstar:Factory

- Allow distros to decide to no longer build python2 bindings
  (bcond_without python2). Tumbleweed declares this already.

OBS-URL: https://build.opensuse.org/request/show/800334
OBS-URL: https://build.opensuse.org/package/show/security:forensics/libesedb?expand=0&rev=13
This commit is contained in:
Greg Freemyer 2020-05-05 23:20:22 +00:00 committed by Git OBS Bridge
parent d01874dcf7
commit 569c925f83
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 5 11:03:08 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Allow distros to decide to no longer build python2 bindings
(bcond_without python2). Tumbleweed declares this already.
-------------------------------------------------------------------
Tue Apr 7 15:32:21 UTC 2020 - Greg Freemyer <Greg.Freemyer@gmail.com>

View File

@ -16,6 +16,8 @@
#
%bcond_without python2
%define lname libesedb1
%define timestamp 20191220
Name: libesedb
@ -32,7 +34,9 @@ Source4: Forensic_analysis_of_the_Windows_Search_database.pdf
Source5: Windows_Search.pdf
Source6: libesedb-libfdata.pdf
BuildRequires: pkg-config
%if %{with python2}
BuildRequires: python-devel
%endif
BuildRequires: pkgconfig(libbfio) >= 20130721
BuildRequires: pkgconfig(libcdata) >= 20140105
BuildRequires: pkgconfig(libcerror) >= 20140105
@ -133,7 +137,13 @@ cp "%{SOURCE5}" .
cp "%{SOURCE6}" .
%build
%configure --disable-static --enable-wide-character-type --enable-python2 --enable-python3
%configure \
--disable-static \
--enable-wide-character-type \
%if %{with python2}
--enable-python2 \
%endif
--enable-python3
make %{?_smp_mflags}
%install
@ -172,11 +182,13 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/pkgconfig/libesedb.pc
%{_mandir}/man3/libesedb.3*
%if %{with python2}
%files -n python2-%{name}
%defattr(-,root,root)
%doc AUTHORS README ChangeLog
%license COPYING
%{python2_sitearch}/pyesedb.so
%endif
%files -n python3-%{name}
%defattr(-,root,root)