Files
extra/zip/PKGBUILD
2025-06-22 20:39:04 -05:00

55 lines
1.7 KiB
Bash

# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=zip
pkgver=3.0
_debver=3.0
_debrel=11
_pkgver=${pkgver/./}
pkgrel=8
pkgdesc='Compressor/archiver for creating and modifying zipfiles'
url='http://www.info-zip.org/Zip.html'
arch=('i686' 'x86_64')
license=('custom:Info-ZIP')
depends=('bzip2')
makedepends=('quilt')
source=("https://downloads.sourceforge.net/infozip/${pkgname}${_pkgver}.tar.gz"
"https://deb.debian.org/debian/pool/main/z/zip/zip_$_debver-$_debrel.debian.tar.xz"
'zipnote.patch')
sha512sums=('c1c3d62bf1426476c0f9919b568013d6d7b03514912035f09ee283226d94c978791ad2af5310021e96c4c2bf320bfc9d0b8f4045c48e4667e034d98197e1a9b3'
'241136f152138ab79612015294019d135ffcf57df314c39e71788e48b2b6496c08366e006d5fa951d6f6481242ad92cbe8a60d155178856305366f8d2ac29636'
'f1608eb54cc60d42fe413bfb566a568de2d3fd1c7e494f1658444b2d6e12c9f818ef6f437392f5d49f5f1f30f023ad9eded69c3878bae998d28c53157a5d0583')
options=('!makeflags')
prepare() {
cd "${srcdir}/${pkgname}${_pkgver}"
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
else
patch -p1 -i ../zipnote.patch
fi
sed -e "/^CFLAGS_NOOPT =/s/\$/ $CPPFLAGS $CFLAGS/" -i unix/Makefile
sed -e "s/^LFLAGS1=''/LFLAGS1=$LDFLAGS/" -i unix/configure
}
build() {
cd "${srcdir}/${pkgname}${_pkgver}"
make -f unix/Makefile prefix=/usr generic_gcc
}
package() {
cd "${srcdir}/${pkgname}${_pkgver}"
make -f unix/Makefile prefix="${pkgdir}"/usr \
MANDIR="${pkgdir}"/usr/share/man/man1 \
install
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}