#!/usr/bin/bash # JOBoRun : Jwm OpenBox Obarun RUNit # Maintainer : Joe Bo Run # PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname" # Website : https://pozol.eu #-----------------------------------------| DESCRIPTION |--------------------------------------- pkgbase=zlib pkgname=(zlib minizip) epoch=1 pkgver=1.2.12 pkgrel=01 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') sha256sums=(91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9 # zlib-1.2.12.tar.gz 1ee1ba0d9e837f44aecf33600c82ae162d76f0069e446afb4c326ac64b5fe995) # zlib-1.2.12.tar.gz.asc