#!/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"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=libnghttp2
pkgver=1.52.0
pkgrel=02
pkgdesc='Framing layer of HTTP/2 is implemented as a reusable C library'
arch=(x86_64)
url='https://nghttp2.org/'
depends=(glibc)
makedepends=('automake' 'autoconf' 'git')
conflicts=('nghttp2<1.20.0-2')
#source=(https://github.com/nghttp2/nghttp2/releases/download/v$pkgver/nghttp2-$pkgver.tar.xz)
_tag='6c023db8a758c19b0adff8fa13e175cf3d7b61b4' # git rev-parse v${pkgver}
source=("git+https://github.com/nghttp2/nghttp2.git#tag=${_tag}?signed")

prepare() {
  cd nghttp2
 
   autoreconf -i
}

build() {

  cd nghttp2
  ./configure \
    --prefix=/usr \
    --disable-examples \
    --disable-python-bindings \
    --enable-lib-only
  make
}

check() {
#  cd nghttp2-$pkgver
  cd nghttp2
  make check
}

package() {
#  cd nghttp2-$pkgver/lib
  cd nghttp2/lib

  make DESTDIR="$pkgdir" install
  install -Dm644 ../COPYING "$pkgdir/usr/share/licenses/libnghttp2/COPYING"
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=(MIT)

validpgpkeys=('F4F3B91474D1EB29889BD0EF7E8403D5D673C366') # Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>

#sha256sums=(3ea9f0439e60469ad4d39cb349938684ffb929dd7e8e06a7bffe9f9d21f8ba7d) # nghttp2-1.52.0.tar.xz
sha256sums=(SKIP)

##  2f64c059a342840f294a5ef6590675ee26715959527ee0254b6b976e6949417e  libnghttp2-1.52.0-02-x86_64.pkg.tar.lz


