- Build the Python modules

OBS-URL: https://build.opensuse.org/package/show/security:forensics/libfcrypto?expand=0&rev=13
This commit is contained in:
Jan Engelhardt 2023-11-23 19:58:54 +00:00 committed by Git OBS Bridge
parent 9edd4bf882
commit ed5a8d5cce
2 changed files with 27 additions and 4 deletions

View File

@ -3,6 +3,7 @@ Thu Nov 23 19:46:16 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Delete system-libs.patch (only needed when _service makes
tarballs directly from git)
- Build the Python modules
-------------------------------------------------------------------
Sun Nov 19 13:51:48 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

View File

@ -16,6 +16,8 @@
#
%{?sle15_python_module_pythons}
Name: libfcrypto
%define lname libfcrypto1
Version: 20221229
@ -27,11 +29,14 @@ URL: https://github.com/libyal/libfcrypto
Source: https://github.com/libyal/libfcrypto/releases/download/%version/libfcrypto-alpha-%version.tar.gz
Source2: https://github.com/libyal/libfcrypto/releases/download/%version/libfcrypto-alpha-%version.tar.gz.asc
Source9: %name.keyring
BuildRequires: %{python_module devel}
BuildRequires: c_compiler
BuildRequires: gettext-tools >= 0.21
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libcerror) >= 20220101
%python_subpackages
# Various notes: https://en.opensuse.org/libyal
%description
@ -63,15 +68,29 @@ applications that want to make use of libfcrypto.
%autosetup -p1
%build
autoreconf -fi
%{python_expand #
# see libcdata for version-sc
echo "V_%version { global: *; };" >v.sym
%configure --disable-static LDFLAGS="-Wl,--version-script=$PWD/v.sym"
%configure --disable-static --disable-rpath \
--enable-wide-character-type \
--enable-python PYTHON_VERSION="%{$python_bin_suffix}" \
LDFLAGS="-Wl,--version-script=$PWD/v.sym"
echo "$python" >lastpython
%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
%check
export PYTHON="$(cat lastpython)"
# The testsuite has a symbol overload for malloc,
# and that no longer works when using version-script
make check || :
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
@ -79,10 +98,13 @@ find "%buildroot" -type f -name "*.la" -delete -print
%license COPYING*
%_libdir/libfcrypto.so.*
%files devel
%files -n %name-devel
%_includedir/*
%_libdir/*.so
%_libdir/pkgconfig/*.pc
%_mandir/man3/*.3*
%files %python_files
%python_sitearch/pyfcrypto.so
%changelog