jobextra/p7zip/PKGBUILD
2023-10-26 22:03:22 +03:00

72 lines
2.5 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=p7zip
pkgver=17.05
pkgrel=02
epoch=1
pkgdesc="Command-line file archiver with high compression ratio"
url="https://github.com/p7zip-project/p7zip"
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)
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
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('LGPL' 'custom:unRAR')
sha256sums=(d2788f892571058c08d27095c22154579dfefb807ebe357d145ab2ddddefb1a6 # p7zip-v17.05.tar.gz
## 9473e324de6a87d89cb7ff65b0fec4ae3f147f03ffc138189c336a4650d74804 # p7zip-v17.05.tar.gz
50f2068124c1c6adc2d9ccf455e9816eccd39d31920b953ab8fcb853232d452c # oemcp-iconv.patch
789789216ca46e5ea9b6780e353f964a1f46e9a2bcaa6b16413adcf9a89eb374 # oemcp-cygwin.patch
dfe1a625f80078c3ec68038f0aae8ba3a82ea96d0aeb97cb3586dc7fb3ef9650 # oemcp-apple.patch
2179e67764eb46cb414ce9b5c978a532a6499617a6a685deb323b6da122aba00) # do-not-gzip-man-pages.patch
## NOTE Rename 1:17 .. 1_17 for sourceforge compatibility
## b9aea8a0e51cd04b58a8313dc6d29968452194ee4b3c23173610e81f1f9bdc0d p7zip-1_17.05-02-x86_64.pkg.tar.lz