# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>

_realname=nspr
pkgname=nsinstall
pkgver=4.37
pkgrel=1
pkgdesc='Netscape portable install command'
arch=('i686' 'x86_64')
url='https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR'
license=('spdx:MPL-2.0')
depends=()
makedepends=('gcc')
source=(https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${_realname}-${pkgver}.tar.gz)
sha256sums=('5f9344ed0e31855bd38f88b33c9d9ab94f70ce547ef3213e488d1520f61840fa')

build() {
  cd ${srcdir}/${_realname}-${pkgver}/${_realname}/config
  $CC $CPPFLAGS $CFLAGS nsinstall.c $LDFLAGS -o nsinstall.exe
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}/${_realname}/config
  install -Dm0755 nsinstall.exe "${pkgdir}"/usr/bin/nsinstall.exe
}
