# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=coin-or-asl
pkgver=2.1.0
pkgrel=1
pkgdesc='COIN-OR autotools harness to build AMPL Solver Library'
arch=(x86_64 aarch64)
url='https://github.com/coin-or-tools/ThirdParty-ASL/'
license=(EPL-2.0)
groups=(coin-or)
depends=(glibc)
makedepends=(git)
source=(git+https://github.com/coin-or-tools/ThirdParty-ASL#tag=releases/$pkgver
        https://coin-or-tools.github.io/ThirdParty-ASL/solvers-64919f75f.tgz)
sha256sums=('c0e11d3bfcc90bd5b8edc8c779b88d5c06523289f3be6b4ed76b4343e99efc48'
            'e212926d1d797701adc901ef18eaab6b15edd13f9281dd8c9266e3cdaf8c2dd3')

prepare() {
  cd ThirdParty-ASL
  ln -s ../solvers .
}

build() {
  cd ThirdParty-ASL
  ./configure --prefix=/usr --srcdir="$PWD"
  make
}

package() {
  cd ThirdParty-ASL
  make DESTDIR="$pkgdir" install
}
