From baa6c5bd84130934f7ca242d07cccdfdd8a107ff Mon Sep 17 00:00:00 2001 From: John McQuah Date: Fri, 31 Mar 2023 09:14:13 -0400 Subject: [PATCH] p7zip: add wrapper script --- p7zip/.footprint | 1 + p7zip/.signature | 6 +++--- p7zip/Pkgfile | 20 +++++++++++++++----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/p7zip/.footprint b/p7zip/.footprint index b9ff2b667..e06f291c8 100644 --- a/p7zip/.footprint +++ b/p7zip/.footprint @@ -5,6 +5,7 @@ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/7zr drwxr-xr-x root/root usr/lib/ drwxr-xr-x root/root usr/lib/p7zip/ +-rwxr-xr-x root/root usr/lib/p7zip/7z -rwxr-xr-x root/root usr/lib/p7zip/7z.so -rwxr-xr-x root/root usr/lib/p7zip/7zCon.sfx drwxr-xr-x root/root usr/lib/p7zip/Codecs/ diff --git a/p7zip/.signature b/p7zip/.signature index c2bfe0862..d9a5c238d 100644 --- a/p7zip/.signature +++ b/p7zip/.signature @@ -1,5 +1,5 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3x6WExw1rZcqha43qKKTJMbNClQ7A5f5XhI+797lKd1+CgT0rDnrqD8NBT6QALGd3iKDkz+KwnXMUf0WFFwUbwk= -SHA256 (Pkgfile) = 992c7a4ced9ce0bf1e21f49f1aeb8ecbf2ff548cdb6f894058ac7778455a7d96 -SHA256 (.footprint) = 4a56314f6083dbde4598f165c96af0252953817f3068abc544f62e1771cb7ac0 +RWSagIOpLGJF32oZHzl0LLd4JsBw2mkCSsqrIEeWFQ1xVvZkh/mAsgFttJZKzmfzyRvr0xlsqiXTDG6ykbLJK4bg8cWzp2wwywQ= +SHA256 (Pkgfile) = 73cc76cfd70ce78397a7775049026d75a7ac5810ae890aae2e34bba5150d72a5 +SHA256 (.footprint) = fb27465e5edafe6856408c50a3d0618ac1b9819cf858acc82737c691dbecd408 SHA256 (p7zip-17.05.tar.gz) = d2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6 diff --git a/p7zip/Pkgfile b/p7zip/Pkgfile index 5bddbe3a4..edb644cba 100644 --- a/p7zip/Pkgfile +++ b/p7zip/Pkgfile @@ -6,19 +6,29 @@ name=p7zip version=17.05 -release=1 +release=2 source=(https://github.com/$name-project/$name/archive/v$version/$name-$version.tar.gz) build() { cd $name-$version - prt-get isinst yasm && cp makefile.linux_amd64_asm makefile.linux \ - || cp makefile.linux_amd64 makefile.linux + prt-get isinst yasm && cp makefile.linux_amd64_asm makefile.machine \ + || cp makefile.linux_amd64 makefile.machine make -j ${JOBS:-1} all3 mkdir -p $PKG/usr/bin $PKG/usr/share/man $PKG/usr/lib/$name - install -m 0755 bin/{7z,7za,7zr} $PKG/usr/bin - install -m 0755 bin/{7z.so,7zCon.sfx} $PKG/usr/lib/$name + install -m 0755 bin/{7za,7zr} $PKG/usr/bin + install -m 0755 bin/{7z,7z.so,7zCon.sfx} $PKG/usr/lib/$name cp -r bin/Codecs $PKG/usr/lib/$name cp -r man1 $PKG/usr/share/man + + # Shared library fails to load when placed in /usr/lib/$name. + # A wrapper script is more robust than -rpath or patchelf. + cat >$PKG/usr/bin/7z <<\EOF +#!/bin/sh + +exec /usr/lib/p7zip/7z "$@" +EOF + + chmod 0755 $PKG/usr/bin/7z }