diff --git a/libfcrypto.changes b/libfcrypto.changes index cd2d6ec..b9ce9f7 100644 --- a/libfcrypto.changes +++ b/libfcrypto.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Nov 23 19:46:16 UTC 2023 - Jan Engelhardt + +- 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 diff --git a/libfcrypto.spec b/libfcrypto.spec index 98b52b6..ae36d70 100644 --- a/libfcrypto.spec +++ b/libfcrypto.spec @@ -16,6 +16,8 @@ # +%{?sle15_python_module_pythons} + Name: libfcrypto %define lname libfcrypto1 Version: 20221229 @@ -27,13 +29,15 @@ 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 -Patch1: system-libs.patch -BuildRequires: autoconf >= 2.71 +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 libfcrypto is a library for encryption formats. @@ -64,16 +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 @@ -81,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 diff --git a/system-libs.patch b/system-libs.patch deleted file mode 100644 index c4306d2..0000000 --- a/system-libs.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Jan Engelhardt -Date: 2021-05-12 17:36:02.536572543 +0200 - -Some dirs are not present in snapshots directly generated from git -(nor are they marked as a submodule). Patch it out, since we have -them as system libs. ---- - Makefile.am | 2 -- - configure.ac | 1 - - 2 files changed, 3 deletions(-) - -Index: libfcrypto-20221228/Makefile.am -=================================================================== ---- libfcrypto-20221228.orig/Makefile.am -+++ libfcrypto-20221228/Makefile.am -@@ -3,7 +3,6 @@ ACLOCAL_AMFLAGS = -I m4 - SUBDIRS = \ - include \ - common \ -- libcerror \ - libfcrypto \ - pyfcrypto \ - pyfcrypto-python2 \ -@@ -61,7 +60,6 @@ lib: library - - library: - (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) -- (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) - (cd $(srcdir)/libfcrypto && $(MAKE) $(AM_MAKEFLAGS)) - (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) - -Index: libfcrypto-20221228/configure.ac -=================================================================== ---- libfcrypto-20221228.orig/configure.ac -+++ libfcrypto-20221228/configure.ac -@@ -108,7 +108,6 @@ dnl Generate Makefiles - AC_CONFIG_FILES([Makefile]) - AC_CONFIG_FILES([include/Makefile]) - AC_CONFIG_FILES([common/Makefile]) --AC_CONFIG_FILES([libcerror/Makefile]) - AC_CONFIG_FILES([libfcrypto/Makefile]) - AC_CONFIG_FILES([pyfcrypto/Makefile]) - AC_CONFIG_FILES([pyfcrypto-python2/Makefile])