# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=gzip
pkgver=1.14
pkgrel=2
pkgdesc="GNU compression utility"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/gzip/"
msys2_repository_url="https://git.savannah.gnu.org/cgit/gzip.git"
msys2_references=(
  "cpe: cpe:/a:gnu:gzip"
  "cpe: cpe:/a:gzip:gzip"
)
license=('GPL3')
groups=('compression')
depends=('bash' 'less')
makedepends=('autotools' 'gcc')
source=(https://ftp.gnu.org/pub/gnu/gzip/gzip-$pkgver.tar.xz{,.sig})
sha256sums=('01a7b881bd220bfdf615f97b8718f80bdfd3f6add385b993dcf6efd14e8c0ac6'
            'SKIP')
validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering <jim@meyering.net>

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  autoreconf -fiv
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure \
    --build=${CHOST} \
    --prefix=/usr \
	gl_cv_clean_version_stddef=yes

  make
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make check || true
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
