From e6fcef5fca1f7ce3cf843e981f0aeacb955ca9655a39dfd87d6e2570a59f16db Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 22 Jan 2022 22:18:56 +0000 Subject: [PATCH] - Enable multipython builds. OBS-URL: https://build.opensuse.org/package/show/security:forensics/libfsntfs?expand=0&rev=30 --- libfsntfs.changes | 5 +++++ libfsntfs.spec | 33 +++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/libfsntfs.changes b/libfsntfs.changes index e482576..c41b466 100644 --- a/libfsntfs.changes +++ b/libfsntfs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jan 22 21:58:27 UTC 2022 - Jan Engelhardt + +- Enable multipython builds. + ------------------------------------------------------------------- Wed Dec 29 10:20:20 UTC 2021 - Jan Engelhardt diff --git a/libfsntfs.spec b/libfsntfs.spec index 81fa75e..c5c6f8b 100644 --- a/libfsntfs.spec +++ b/libfsntfs.spec @@ -1,7 +1,7 @@ # # spec file for package libfsntfs # -# 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 @@ -28,10 +28,12 @@ Source: https://github.com/libyal/libfsntfs/releases/download/%version/l Source2: https://github.com/libyal/libfsntfs/releases/download/%version/libfsntfs-experimental-%version.tar.gz.asc Source3: %name.keyring 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(fuse) >= 2.6 BuildRequires: pkgconfig(libbfio) >= 20201229 BuildRequires: pkgconfig(libcdata) >= 20210625 @@ -50,7 +52,7 @@ BuildRequires: pkgconfig(libfusn) >= 20180726 BuildRequires: pkgconfig(libfwnt) >= 20210906 BuildRequires: pkgconfig(libhmac) >= 20200104 BuildRequires: pkgconfig(libuna) >= 20210801 -BuildRequires: pkgconfig(python3) +%python_subpackages %description Library and tools to access the New Technology File System (NTFS). @@ -89,24 +91,23 @@ Requires: %{lname} = %{version} This subpackage contains libraries and header files for developing applications that want to make use of %{name}. -%package -n python3-%{name} -Summary: Python 3 bindings for libfsntfs -License: LGPL-3.0-or-later -Group: Development/Languages/Python - -%description -n python3-%{name} -Python 3 binding for libfsntfs, which can access the NTFS filesystem. - %prep %autosetup -p1 %build autoreconf -fi -%configure --disable-static --enable-wide-character-type --enable-python3 +# 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 +mv %_builddir/rt/* %buildroot/ find %{buildroot} -type f -name "*.la" -delete -print %post -n %{lname} -p /sbin/ldconfig @@ -116,19 +117,19 @@ find %{buildroot} -type f -name "*.la" -delete -print %license COPYING* %{_libdir}/libfsntfs.so.* -%files tools +%files -n %name-tools %{_bindir}/fsntfs* %{_mandir}/man1/fsntfsinfo.1* -%files devel +%files -n %name-devel %{_includedir}/libfsntfs.h %{_includedir}/libfsntfs/ %{_libdir}/libfsntfs.so %{_libdir}/pkgconfig/libfsntfs.pc %{_mandir}/man3/libfsntfs.3* -%files -n python3-%{name} +%files %python_files %license COPYING* -%{python3_sitearch}/pyfsntfs.so +%{python_sitearch}/pyfsntfs.so %changelog