From 97531ec74191e1f677a07402a6bc5abeddf563f5f29e198bbf78a021e405dd23 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 24 Jan 2022 10:02:18 +0000 Subject: [PATCH] - Enable multipython builds. OBS-URL: https://build.opensuse.org/package/show/security:forensics/libmsiecf?expand=0&rev=18 --- libmsiecf.changes | 5 +++++ libmsiecf.spec | 38 +++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/libmsiecf.changes b/libmsiecf.changes index a4a12fb..118f4df 100644 --- a/libmsiecf.changes +++ b/libmsiecf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 24 09:34:24 UTC 2022 - Jan Engelhardt + +- Enable multipython builds. + ------------------------------------------------------------------- Fri May 14 21:48:40 UTC 2021 - Jan Engelhardt diff --git a/libmsiecf.spec b/libmsiecf.spec index 4a9a4d7..d014dea 100644 --- a/libmsiecf.spec +++ b/libmsiecf.spec @@ -1,7 +1,7 @@ # # spec file for package libmsiecf # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,10 +27,12 @@ URL: https://github.com/libyal/libmsiecf Source: %name-%version.tar.xz Source2: MSIE_Cache_File_index.dat_format.pdf Patch1: system-libs.patch +BuildRequires: %{python_module devel} BuildRequires: c_compiler BuildRequires: gettext-tools >= 0.18.1 BuildRequires: libtool BuildRequires: pkg-config +BuildRequires: python-rpm-macros BuildRequires: pkgconfig(libbfio) >= 20201229 BuildRequires: pkgconfig(libcdata) >= 20200509 BuildRequires: pkgconfig(libcerror) >= 20201121 @@ -45,7 +47,7 @@ BuildRequires: pkgconfig(libfguid) >= 20180724 BuildRequires: pkgconfig(libfole) >= 20170502 BuildRequires: pkgconfig(libfvalue) >= 20210510 BuildRequires: pkgconfig(libuna) >= 20201204 -BuildRequires: pkgconfig(python3) +%python_subpackages %description libmsiecf is a library to parse MS Internet Explorer Cache Files. @@ -78,26 +80,24 @@ libmsiecf is a library to parse MS Internet Explorer Cache Files. This subpackage contains libraries and header files for developing applications that want to make use of %name. -%package -n python3-%{name} -Summary: Python bindings for libmsiecf -License: LGPL-3.0-or-later -Group: Development/Libraries/Python - -%description -n python3-%name -Python bindings for libmsiecf, which can read MS IE cache files. - %prep %autosetup -p1 -cp "%SOURCE2" . +cp %_sourcedir/*.pdf . %build -if [ ! -e configure ]; then ./autogen.sh; fi -%configure --disable-static --enable-wide-character-type --enable-python3 +autoreconf -fi +# OOT builds are presently broken, so we have to install +# within each python iteration now, not in %%install. +%{python_expand # +%configure --disable-static --enable-wide-character-type --enable-python PYTHON_VERSION="%{$python_bin_suffix}" %make_build +%make_install DESTDIR="%_builddir/rt" +%make_build clean +} %install -%make_install -find %buildroot -name '*.la' -delete +mv %_builddir/rt/* %buildroot/ +find %{buildroot} -type f -name "*.la" -delete -print %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -106,11 +106,11 @@ find %buildroot -name '*.la' -delete %license COPYING* %_libdir/libmsiecf.so.* -%files tools +%files -n %name-tools %_bindir/msiecf* %_mandir/man1/msiecf*.1* -%files devel +%files -n %name-devel %doc MSIE_Cache_File*.pdf %_includedir/libmsiecf.h %_includedir/libmsiecf/ @@ -118,8 +118,8 @@ find %buildroot -name '*.la' -delete %_libdir/pkgconfig/libmsiecf.pc %_mandir/man3/libmsiecf.3* -%files -n python3-%name +%files %python_files %license COPYING* -%python3_sitearch/pymsiecf.so +%python_sitearch/pymsiecf.so %changelog