void-packages/srcpkgs/7zip/template

74 lines
1.9 KiB
Bash
Raw Normal View History

2022-08-29 19:01:17 +02:00
# Template file for '7zip'
pkgname=7zip
version=22.01
revision=2
2022-08-29 19:01:17 +02:00
short_desc="File archiver with a high compression ratio"
maintainer="Roberto Ricci <ricci@disroot.org>"
license="LGPL-2.1-or-later, BSD-3-Clause"
homepage="https://www.7-zip.org"
changelog="https://www.7-zip.org/history.txt"
distfiles="https://www.7-zip.org/a/7z${version//./}-src.tar.xz"
checksum=393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5
alternatives="
7z:7z:/usr/bin/7zip
7z:7za:/usr/bin/7zip
7z:7zr:/usr/bin/7zip"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# missing pthread_attr_setaffinity_np()
CFLAGS+="-D_7ZIP_AFFINITY_DISABLE"
CXXFLAGS+="-D_7ZIP_AFFINITY_DISABLE"
fi
do_build() {
cd "$wrksrc"/CPP/7zip/Bundles/Alone2
case "$XBPS_TARGET_MACHINE" in
aarch64*) _7z_makefile="../../cmpl_gcc_arm64.mak";;
*) _7z_makefile="../../cmpl_gcc.mak";;
esac
for opts in "O=b/norar DISABLE_RAR_COMPRESS=1" "O=b/rar"; do
make "$makejobs" -f "$_7z_makefile" \
CC="$CC" CXX="$CXX" \
VOID_CFLAGS="$CFLAGS" VOID_CXXFLAGS="$CXXFLAGS" \
VOID_LDFLAGS="$LDFLAGS" VOID_CPPFLAGS="$CPPFLAGS" \
$opts
done
}
do_install() {
vbin "${wrksrc}/CPP/7zip/Bundles/Alone2/b/norar/7zz" "7zip"
vlicense "${wrksrc}/DOC/License.txt"
}
7zip-unrar_package() {
license+=", custom:freeware"
repository=nonfree
short_desc+=" - RAR support"
alternatives="
7z:7z:/usr/bin/7zip-unrar
7z:7za:/usr/bin/7zip-unrar
7z:7zr:/usr/bin/7zip-unrar"
pkg_install() {
vbin "${wrksrc}/CPP/7zip/Bundles/Alone2/b/rar/7zz" "7zip-unrar"
vlicense "${wrksrc}/DOC/License.txt"
}
}
p7zip_package() {
build_style=meta
depends=7zip
short_desc="Command-line version of the 7zip compressed file archive"
short_desc+=" (transitional dummy package)"
}
p7zip-unrar_package() {
build_style=meta
repository=nonfree
depends=7zip-unrar
short_desc="Command-line version of the 7zip compressed file archive - RAR support"
short_desc+=" (transitional dummy package)"
}