jobcore/zlib/PKGBUILD

77 lines
2.2 KiB
Bash
Raw Normal View History

2022-03-20 13:19:37 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=zlib
pkgname=(zlib minizip)
epoch=1
pkgver=1.2.11
pkgrel=05
arch=('x86_64')
url="https://www.zlib.net/"
depends=('glibc')
makedepends=('automake' 'autoconf')
options=('staticlibs') # needed by binutils testsuite
source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc})
prepare() {
cd "${srcdir}/zlib-$pkgver"
grep -A 24 '^ Copyright' zlib.h > LICENSE
}
build() {
cd "${srcdir}/zlib-$pkgver"
./configure --prefix=/usr
CFLAGS+=" -ffat-lto-objects"
make
cd contrib/minizip
cp Makefile Makefile.orig
cp ../README.contrib readme.txt
autoreconf --install
./configure --prefix=/usr --enable-static=no
make
}
check() {
cd "${srcdir}/zlib-$pkgver"
make test
cd contrib/minizip
make -f Makefile.orig test
}
package_zlib() {
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
cd "${srcdir}/zlib-$pkgver"
make install DESTDIR="${pkgdir}"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/zlib/LICENSE"
}
package_minizip() {
pkgdesc='Mini zip and unzip based on zlib'
depends=('zlib')
cd "${srcdir}/zlib-$pkgver/contrib/minizip"
make install DESTDIR="${pkgdir}"
install -D -m644 "${srcdir}/zlib-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/minizip/LICENSE"
# https://github.com/madler/zlib/pull/229
rm "${pkgdir}/usr/include/minizip/crypt.h"
}
#---- license gpg-key sha256sums ----
license=('custom')
validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')
sha512sums=('73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae' # zlib-1.2.11.tar.gz
'da3bc7db37d9a42497e486ae8d68d4ff8d9a94f30c4926ca08c589b9c522dece48229182cd79a2e0a42be06852783dc6a72cdd9222f77df5b9e0c6998cb9e3bc') # zlib-1.2.11.tar.gz.asc
sha256sums=(c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 # zlib-1.2.11.tar.gz
aeee5d17282da556bb399e16d894ebbf22a59138fc6ca96e96614f62e1b5d9d0) # zlib-1.2.11.tar.gz.asc