Accepting request 800345 from home:dimstar:Factory

- Allow distros to disable python2 build (bcond_without python2):
  Tumbleweed already declares this, as python2 is EOL.

OBS-URL: https://build.opensuse.org/request/show/800345
OBS-URL: https://build.opensuse.org/package/show/security:forensics/libregf?expand=0&rev=20
This commit is contained in:
Greg Freemyer 2020-05-05 23:25:00 +00:00 committed by Git OBS Bridge
parent 0546495fd3
commit 531bac9301
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 5 11:21:40 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Allow distros to disable python2 build (bcond_without python2):
Tumbleweed already declares this, as python2 is EOL.
-------------------------------------------------------------------
Mon Apr 6 02:03:27 UTC 2020 - Greg Freemyer <Greg.Freemyer@gmail.com>

View File

@ -16,6 +16,7 @@
#
%bcond_without python2
Name: libregf
%define lname libregf1
%define timestamp 20191221
@ -28,7 +29,9 @@ URL: https://github.com/libyal/libregf/wiki
Source: https://github.com/libyal/libregf/releases/download/%timestamp/%name-alpha-%timestamp.tar.gz
Source2: Windows_NT_Registry_File_REGF_format.pdf
BuildRequires: pkg-config
%if %{with python2}
BuildRequires: python-devel
%endif
BuildRequires: pkgconfig(fuse) >= 2.6
BuildRequires: pkgconfig(libbfio) >= 20131003
BuildRequires: pkgconfig(libcdata) >= 20130904
@ -121,7 +124,13 @@ This subpackage contains the Python3 bindings for libregf.
cp "%{SOURCE2}" .
%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
@ -151,11 +160,13 @@ find %{buildroot} -name '*.la' -delete
%{_libdir}/pkgconfig/libregf.pc
%{_mandir}/man3/libregf.3*
%if %{with python2}
%files -n python2-%{name}
%defattr(-,root,root)
%doc AUTHORS README
%license COPYING
%{python2_sitearch}/pyregf.so
%endif
%files -n python3-%{name}
%defattr(-,root,root)