diff --git a/genders.changes b/genders.changes index a963eb1..a84ebab 100644 --- a/genders.changes +++ b/genders.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 25 12:25:49 UTC 2022 - Christian Goll + +- remove the hard coded rpath explicitly + ------------------------------------------------------------------- Thu Dec 19 14:19:10 UTC 2019 - Christian Goll diff --git a/genders.spec b/genders.spec index e93813d..0c29558 100644 --- a/genders.spec +++ b/genders.spec @@ -1,7 +1,7 @@ # # spec file for package genders # -# Copyright (c) 2019 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 @@ -40,6 +40,9 @@ BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: lua-devel +BuildRequires: patchelf +BuildRequires: python +BuildRequires: python-devel BuildRequires: python3 BuildRequires: python3-devel BuildRequires: perl(ExtUtils::MakeMaker) @@ -77,13 +80,13 @@ Requires: %{name} = %{version} %description devel genders headers and libraries files needed for development -%package -n python3-%{name} +%package -n python-%{name} Summary: Python bindings for genders Group: Development/Languages/Python Requires: %{name} = %{version} Requires: python -%description -n python3-%{name} +%description -n python-%{name} Necessary files for using genders with Python. %package -n lua-%{name} @@ -118,7 +121,7 @@ Summary: C++ library API for genders Group: System/Libraries Requires: %{name}-base -%description -n lib%{name}plusplus%{cpp_api} +%description -n lib%{name}plusplus%{cpp_api} This package contains the library needed to run programs dynamically linked with genders. This is the C++ API. @@ -135,22 +138,19 @@ with genders. This is the C++ API. %if %{?_with_perl_vendor_arch:1}%{!?_with_perl_vendor_arch:0} %define _perldir %(perl -e 'use Config; $T=$Config{installvendorarch}; $P=$Config{vendorprefix}; $T=~/$P\\/(.*)/; print "%{_prefix}/$1\\n"') %endif + %prep %setup -c -q -n %{name}-%{version} mv genders-genders-%{slash_ver}/* . rm -r genders-genders-%{slash_ver} -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 +%autopatch -p1 %build aclocal --force --install -I config libtoolize -f -i automake -a -f autoconf --force -mkdir -p bin/ -ln -s $(which python3) bin/python -export PATH=$(pwd)/bin/:${PATH} +export GENDERS_LIBDIR=%{_libdir} %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ %{?_with_perl_extensions} \ %{?_without_perl_extensions} \ @@ -178,15 +178,14 @@ export NO_BRP_CHECK_RPATH=true find "%{buildroot}" -name .packlist -exec sed -i "s#%{buildroot}##" {} + find "%{buildroot}" -name .packlist -exec sed -i '/BUILDROOT/d' {} + -for file in %{buildroot}%{_prefix}/lib/genders/*.pl; do grep '#!/usr/bin/perl' $file || sed -i '1s,^,#!/usr/bin/perl\n,' $file ;done +for file in %{buildroot}%{_prefix}/lib/genders/*.pl; do grep '#!/usr/bin/perl' $file || sed -i '1s,^,#!/usr/bin/perl\n,' $file ;done # remove .a files %if %{?_with_cplusplus_extensions:1}%{!?_with_cplusplus_extensions:0} rm -v %{buildroot}%{_libdir}/libgendersplusplus.la %endif rm -v %{buildroot}%{_libdir}/libgenders.la -rm -rv %{buildroot}%{_libdir}/python*/site-packages/__pycache__ -find %{buildroot}%{_libdir}/lua -name \*.la -delete +find %{buildroot}%{_libdir}/lua -name \*.la -delete mkdir -p %{buildroot}%{_sysconfdir} # create sample config, but remove comments cat > %{buildroot}%{_sysconfdir}/genders < %{buildroot}%{_sysconfdir}/genders <> %{buildroot}%{_sysconfdir}/genders sed -i -e 's/^\([^#]\)/## \1/' %{buildroot}%{_sysconfdir}/genders +# remove rpath the hard way +brklib=$(find %{buildroot} -name Libgenders.so -print) +chmod 644 $brklib +patchelf --remove-rpath $brklib +chmod 444 $brklib -%post -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig +%post -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig -%postun -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig +%postun -n lib%{name}plusplus%{cpp_api} -p /sbin/ldconfig -%post -n lib%{name}%{c_api} -p /sbin/ldconfig +%post -n lib%{name}%{c_api} -p /sbin/ldconfig -%postun -n lib%{name}%{c_api} -p /sbin/ldconfig +%postun -n lib%{name}%{c_api} -p /sbin/ldconfig %files %defattr(-,root,root) @@ -243,7 +247,7 @@ sed -i -e 's/^\([^#]\)/## \1/' %{buildroot}%{_sysconfdir}/genders %{_mandir}/man3/libgenders* %if %{?_with_python_extensions:1}%{!?_with_python_extensions:0} -%files -n python3-%{name} +%files -n python-%{name} %{_libdir}/python* %endif diff --git a/lua_bindings.patch b/lua_bindings.patch index f68fa8a..e43c90f 100644 --- a/lua_bindings.patch +++ b/lua_bindings.patch @@ -1,3 +1,27 @@ +From 93e668aa34d1315140349217cb39563c78b33fe2 Mon Sep 17 00:00:00 2001 +From: Christian Goll +Date: Fri, 22 Jul 2022 14:39:37 +0200 +Subject: [PATCH 1/2] added lua bindings + +--- + config/ac_lua_extensions.m4 | 21 ++ + config/x_ac_lua.m4 | 60 ++++ + configure.ac | 21 ++ + genders.spec | 110 ++++++ + src/extensions/Makefile.am | 2 +- + .../lua/GendersTest/GendersTest.lua | 134 ++++++++ + src/extensions/lua/GendersTest/testgenders | 21 ++ + src/extensions/lua/Makefile.am | 21 ++ + src/extensions/lua/genderslua.c | 322 ++++++++++++++++++ + 9 files changed, 711 insertions(+), 1 deletion(-) + create mode 100644 config/ac_lua_extensions.m4 + create mode 100644 config/x_ac_lua.m4 + create mode 100644 genders.spec + create mode 100755 src/extensions/lua/GendersTest/GendersTest.lua + create mode 100644 src/extensions/lua/GendersTest/testgenders + create mode 100644 src/extensions/lua/Makefile.am + create mode 100644 src/extensions/lua/genderslua.c + diff --git a/config/ac_lua_extensions.m4 b/config/ac_lua_extensions.m4 new file mode 100644 index 0000000..9421588 @@ -792,3 +816,6 @@ index 0000000..f2364af + + return 1; +} +-- +2.37.1 +