File PKGBUILD of Package duktape-archlinux

pkgname=duktape
pkgver=2.7.0
pkgrel=1
pkgdesc='Embeddable Javascript engine'
url='https://duktape.org/'
arch=(x86_64)
license=(MIT)
makedepends=(curl gzip)
depends=(glibc)
provides=(libduktape{,d}.so)
options=(debug)
# Download it from: https://duktape.org/duktape-2.7.0.tar.xz
source=("https://duktape.org/$pkgname-$pkgver.tar.xz")
b2sums=('da5eea88758201177f32c5611a3757433ef1b0173d6430eff1f067abd7535f3e4b9c3717290fbd8475827a53f7a2a74818287a65e563f14e91761f5cd0fe30d5')

# https://duktape.org/download.html
md5sums=('b3200b02ab80125b694bae887d7c1ca6')

_make() (
  make -f Makefile.sharedlibrary INSTALL_PREFIX=/usr "$@"
)

build() {
  CFLAGS="$CFLAGS -DDUK_USE_FASTINT"

  cd $pkgname-$pkgver
  _make
}

package() {
  cd $pkgname-$pkgver
  _make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE.txt 
}
openSUSE Build Service is sponsored by