* replace p7zip with 7zip
This commit is contained in:
parent
6bd0585c06
commit
9d75b6715a
58
7zip/PKGBUILD
Normal file
58
7zip/PKGBUILD
Normal file
@ -0,0 +1,58 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# Maintainer: Evangelos Foutras <foutrelis@archlinux.org>
|
||||
|
||||
pkgname=7zip
|
||||
pkgver=24.09
|
||||
pkgrel=3
|
||||
pkgdesc="File archiver for extremely high compression"
|
||||
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
||||
url="https://www.7-zip.org"
|
||||
license=('LGPL-2.1-or-later' 'BSD-3-Clause' 'LicenseRef-UnRAR')
|
||||
depends=('glibc' 'gcc-libs' 'sh')
|
||||
makedepends_x86_64=('uasm')
|
||||
provides=('p7zip')
|
||||
conflicts=('p7zip')
|
||||
replaces=('p7zip')
|
||||
source=(https://7-zip.org/a/7z${pkgver//./}-src.tar.xz)
|
||||
sha256sums=('49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a')
|
||||
|
||||
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 "${_platform_flags[@]}" \
|
||||
LFLAGS_STRIP= \
|
||||
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"
|
||||
|
||||
for _prog in 7za 7zr 7z; do
|
||||
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
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
@ -1,63 +0,0 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
# Contributor: Gaetan Bisson <bisson@archlinux.org>
|
||||
# Contributor: Thayer Williams <thayer@archlinux.org>
|
||||
# Contributor: Hugo Doria <hugo@archlinux.org>
|
||||
# Contributor: TuxSpirit<tuxspirit@archlinux.fr>
|
||||
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
|
||||
|
||||
pkgname=p7zip
|
||||
pkgver=17.05
|
||||
pkgrel=2.1
|
||||
epoch=1
|
||||
pkgdesc="Command-line file archiver with high compression ratio"
|
||||
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
||||
url="https://github.com/p7zip-project/p7zip"
|
||||
license=('LGPL' 'custom:unRAR')
|
||||
depends=('gcc-libs' 'sh')
|
||||
source=(https://github.com/p7zip-project/p7zip/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
|
||||
oemcp-iconv.patch::https://github.com/p7zip-project/p7zip/commit/c104127e6a93.patch
|
||||
oemcp-cygwin.patch::https://github.com/p7zip-project/p7zip/commit/0e0a1a8316b6.patch
|
||||
oemcp-apple.patch::https://github.com/p7zip-project/p7zip/commit/334a01e3f8bc.patch
|
||||
do-not-gzip-man-pages.patch)
|
||||
sha256sums=('d2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6'
|
||||
'50f2068124c1c6adc2d9ccf455e9816eccd39d31920b953ab8fcb853232d452c'
|
||||
'789789216ca46e5ea9b6780e353f964a1f46e9a2bcaa6b16413adcf9a89eb374'
|
||||
'dfe1a625f80078c3ec68038f0aae8ba3a82ea96d0aeb97cb3586dc7fb3ef9650'
|
||||
'2179e67764eb46cb414ce9b5c978a532a6499617a6a685deb323b6da122aba00')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
# Leave man page compression to makepkg to maintain reproducibility
|
||||
patch -Np1 -i ../do-not-gzip-man-pages.patch
|
||||
|
||||
# https://github.com/p7zip-project/p7zip/issues/112
|
||||
patch -Rp1 -i ../oemcp-apple.patch
|
||||
patch -Rp1 -i ../oemcp-cygwin.patch
|
||||
patch -Rp1 -i ../oemcp-iconv.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
make OPTFLAGS="$CPPFLAGS $CFLAGS" 7z 7zr 7za
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
make install \
|
||||
DEST_DIR="$pkgdir" \
|
||||
DEST_HOME=/usr \
|
||||
DEST_MAN=/usr/share/man
|
||||
|
||||
# Remove documentation for the GUI file manager
|
||||
rm -r "$pkgdir/usr/share/doc/p7zip/DOC/MANUAL/fm"
|
||||
|
||||
install -d "${pkgdir}"/usr/share/licenses/p7zip
|
||||
ln -s -t "$pkgdir/usr/share/licenses/p7zip/" \
|
||||
/usr/share/doc/p7zip/DOC/License.txt \
|
||||
/usr/share/doc/p7zip/DOC/unRarLicense.txt
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
Loading…
x
Reference in New Issue
Block a user