From 25b5e05302f6e818da795aa989634aea5b6a9e12 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 22 Dec 2024 14:58:47 +0200 Subject: Add 7-Zip 24.09 package --- PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..c843bff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Evangelos Foutras + +pkgname=7zip +pkgver=24.09 +pkgrel=1 +pkgdesc="File archiver for extremely high compression" +arch=('x86_64') +url="https://www.7-zip.org" +license=('LGPL-2.1-or-later' 'BSD-3-Clause' 'LicenseRef-UnRAR') +depends=('glibc' 'gcc-libs' 'sh') +makedepends=('uasm') +provides=('p7zip') +conflicts=('p7zip') +replaces=('p7zip') +source=(https://7-zip.org/a/7z${pkgver//./}-src.tar.xz) +sha256sums=('49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a') + +prepare() { + sed -i '/^LFLAGS_ALL = /s/$(LFLAGS_STRIP)//' CPP/7zip/7zip_gcc.mak +} + +build() { + for component in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do + make -C CPP/7zip/$component -f ../../cmpl_gcc.mak \ + CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \ + CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS" + done +} + +package() { + install -Dt "$pkgdir/usr/lib/7zip" \ + CPP/7zip/Bundles/Alone/b/g/7za \ + CPP/7zip/Bundles/Alone7z/b/g/7zr \ + CPP/7zip/Bundles/Format7zF/b/g/7z.so \ + CPP/7zip/UI/Console/b/g/7z + install -D CPP/7zip/Bundles/SFXCon/b/g/7zCon "$pkgdir/usr/lib/7zip/7zCon.sfx" + + mkdir -p "$pkgdir/usr/bin" + for _prog in 7za 7zr 7z; do + echo -e "#!/bin/sh\nexec /usr/lib/7zip/$_prog \$@" >"$pkgdir/usr/bin/$_prog" + chmod +x "$pkgdir/usr/bin/$_prog" + done + + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" DOC/{,unRar}License.txt +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-70-g09d2 From f3f6dbc0474b811725a47fb1c9bf5f57eb611ca2 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 22 Dec 2024 17:26:29 +0200 Subject: upgpkg: 24.09-1 --- .SRCINFO | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .SRCINFO diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..a8aedad --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = 7zip + pkgdesc = File archiver for extremely high compression + pkgver = 24.09 + pkgrel = 1 + url = https://www.7-zip.org + arch = x86_64 + license = LGPL-2.1-or-later + license = BSD-3-Clause + license = LicenseRef-UnRAR + makedepends = uasm + depends = glibc + depends = gcc-libs + depends = sh + provides = p7zip + conflicts = p7zip + replaces = p7zip + source = https://7-zip.org/a/7z2409-src.tar.xz + sha256sums = 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a + +pkgname = 7zip -- cgit v1.2.3-70-g09d2 From 0f72c0e63806f7a635566ae7722c60668acda624 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 22 Dec 2024 17:28:19 +0200 Subject: Add nvchecker config file --- .nvchecker.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .nvchecker.toml diff --git a/.nvchecker.toml b/.nvchecker.toml new file mode 100644 index 0000000..daffd0d --- /dev/null +++ b/.nvchecker.toml @@ -0,0 +1,3 @@ +[7zip] +source = "git" +git = "https://github.com/ip7z/7zip.git" -- cgit v1.2.3-70-g09d2 From efe547336aa0b2713e62a444e56285615eb9f10f Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 22 Dec 2024 18:30:34 +0200 Subject: upgpkg: 24.09-2: fix argument quoting in wrapper scripts Fixes #1 --- .SRCINFO | 2 +- PKGBUILD | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index a8aedad..61774b6 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = 7zip pkgdesc = File archiver for extremely high compression pkgver = 24.09 - pkgrel = 1 + pkgrel = 2 url = https://www.7-zip.org arch = x86_64 license = LGPL-2.1-or-later diff --git a/PKGBUILD b/PKGBUILD index c843bff..b32027a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=7zip pkgver=24.09 -pkgrel=1 +pkgrel=2 pkgdesc="File archiver for extremely high compression" arch=('x86_64') url="https://www.7-zip.org" @@ -37,7 +37,7 @@ package() { mkdir -p "$pkgdir/usr/bin" for _prog in 7za 7zr 7z; do - echo -e "#!/bin/sh\nexec /usr/lib/7zip/$_prog \$@" >"$pkgdir/usr/bin/$_prog" + echo -e "#!/bin/sh\nexec /usr/lib/7zip/$_prog \"\$@\"" >"$pkgdir/usr/bin/$_prog" chmod +x "$pkgdir/usr/bin/$_prog" done -- cgit v1.2.3-70-g09d2 From c5dafb4acada32c732e0d2cb66f1e78d0b603ddf Mon Sep 17 00:00:00 2001 From: Hanabishi Recca <1722-hanabishi@users.noreply.gitlab.archlinux.org> Date: Sun, 22 Dec 2024 19:20:31 +0000 Subject: Enable ASM code --- PKGBUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index b32027a..fde48c0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,6 +22,9 @@ prepare() { build() { for component in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do make -C CPP/7zip/$component -f ../../cmpl_gcc.mak \ + MY_ASM=uasm \ + USE_ASM=1 \ + IS_X64=1 \ CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \ CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS" done -- cgit v1.2.3-70-g09d2 From 3d5e761744fb0e46a9818dd03d113a98e09e1253 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Wed, 25 Dec 2024 17:50:50 +0200 Subject: Provide platform/assembly flags per architecture Trying to be mindful of downstream distros. --- PKGBUILD | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index fde48c0..bfbe5a8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -20,11 +20,22 @@ prepare() { } build() { + local _platform_flags=() + + case $CARCH in + x86_64) + _platform_flags=(PLATFORM=x64 IS_X64=1 MY_ASM=uasm USE_ASM=1) + ;; + i686) + _platform_flags=(PLATFORM=x86 IS_X86=1 MY_ASM=uasm USE_ASM=1) + ;; + aarch64) + _platform_flags=(PLATFORM=arm64 IS_ARM64=1 MY_ASM=uasm USE_ASM=1) + ;; + esac + for component in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do - make -C CPP/7zip/$component -f ../../cmpl_gcc.mak \ - MY_ASM=uasm \ - USE_ASM=1 \ - IS_X64=1 \ + make -C CPP/7zip/$component -f ../../cmpl_gcc.mak "${_platform_flags[@]}" \ CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \ CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS" done -- cgit v1.2.3-70-g09d2 From 78060211cd30c74b923c455af0434a4e38875b56 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Wed, 25 Dec 2024 17:55:36 +0200 Subject: upgpkg: 24.09-3 --- .SRCINFO | 2 +- PKGBUILD | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 61774b6..a9bf14c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = 7zip pkgdesc = File archiver for extremely high compression pkgver = 24.09 - pkgrel = 2 + pkgrel = 3 url = https://www.7-zip.org arch = x86_64 license = LGPL-2.1-or-later diff --git a/PKGBUILD b/PKGBUILD index bfbe5a8..e6f91a8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=7zip pkgver=24.09 -pkgrel=2 +pkgrel=3 pkgdesc="File archiver for extremely high compression" arch=('x86_64') url="https://www.7-zip.org" @@ -15,10 +15,6 @@ replaces=('p7zip') source=(https://7-zip.org/a/7z${pkgver//./}-src.tar.xz) sha256sums=('49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a') -prepare() { - sed -i '/^LFLAGS_ALL = /s/$(LFLAGS_STRIP)//' CPP/7zip/7zip_gcc.mak -} - build() { local _platform_flags=() @@ -36,6 +32,7 @@ build() { for component in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do make -C CPP/7zip/$component -f ../../cmpl_gcc.mak "${_platform_flags[@]}" \ + LFLAGS_STRIP= \ CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \ CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS" done -- cgit v1.2.3-70-g09d2 From edea47939b44fabe804cddfca5a51ea3058e3cec Mon Sep 17 00:00:00 2001 From: nl6720 Date: Sat, 28 Dec 2024 16:19:51 +0200 Subject: Use printf to improve readability Using `printf` with a single-quoted string avoids the need to escape double quotes. --- PKGBUILD | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index e6f91a8..84b1092 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -48,8 +48,7 @@ package() { mkdir -p "$pkgdir/usr/bin" for _prog in 7za 7zr 7z; do - echo -e "#!/bin/sh\nexec /usr/lib/7zip/$_prog \"\$@\"" >"$pkgdir/usr/bin/$_prog" - chmod +x "$pkgdir/usr/bin/$_prog" + printf '#!/bin/sh\nexec /usr/lib/7zip/%s "$@"\n' "$_prog" | install -m755 /dev/stdin "$pkgdir/usr/bin/$_prog" done install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" DOC/{,unRar}License.txt -- cgit v1.2.3-70-g09d2 From 44013cbf5062680251b8bdee5bfe9cb240b6e233 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sat, 28 Dec 2024 17:35:56 +0200 Subject: Further tweak wrapper script creation + drop mkdir --- PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 84b1092..ab0524b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -46,9 +46,9 @@ package() { CPP/7zip/UI/Console/b/g/7z install -D CPP/7zip/Bundles/SFXCon/b/g/7zCon "$pkgdir/usr/lib/7zip/7zCon.sfx" - mkdir -p "$pkgdir/usr/bin" for _prog in 7za 7zr 7z; do - printf '#!/bin/sh\nexec /usr/lib/7zip/%s "$@"\n' "$_prog" | install -m755 /dev/stdin "$pkgdir/usr/bin/$_prog" + printf '#!/bin/sh\nexec /usr/lib/7zip/%s "$@"\n' "$_prog" \ + | install -D /dev/stdin "$pkgdir/usr/bin/$_prog" done install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" DOC/{,unRar}License.txt -- cgit v1.2.3-70-g09d2