Skip to content

Commit

Permalink
Add the mingw-w64-7zip package
Browse files Browse the repository at this point in the history
MSYS2 does offer the `p7zip` package. But it is an MSYS package (and
therefore the executable is slower than it needs to be), and besides,
the p7zip project seems to be abandoned since 2016.

In the meantime, the 7-Zip project itself added support for building the
command-line tool on Linux, and we can use that very same setup to build
a MINGW version, too. So let's do that.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Nov 3, 2022
1 parent 167f429 commit 85985a6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions mingw-w64-7zip/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Maintainer: Johannes Schindelin <[email protected]>

_realname=7zip
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=22.01
pkgrel=1
pkgdesc="A file archiver with a high compression ratio (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://7-zip.org"
license=('LGPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("$url/a/7z${pkgver//./}-src.tar.xz")
sha256sums=('393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5')

build() {
cd "${srcdir}"/CPP/7zip/UI/Console

make -f makefile.gcc
}

package() {
cd "${srcdir}"

install -D -m755 CPP/7zip/UI/Console/_o/7z.exe "${pkgdir}"${MINGW_PREFIX}/bin/7z.exe

install -d "${pkgdir}"${MINGW_PREFIX}/share/doc/7zip
install -D -m644 DOC/* "${pkgdir}"${MINGW_PREFIX}/share/doc/7zip
}

0 comments on commit 85985a6

Please sign in to comment.