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

pkgname=libbraiding
pkgver=1.0
pkgrel=3
pkgdesc="Library to compute several properties of braids, including centralizer and conjugacy check"
arch=(x86_64)
url="https://github.com/miguelmarco/libbraiding"
license=(GPL3)
depends=(gcc-libs)
source=("https://mirrors.mit.edu/sage/spkg/upstream/libbraiding/$pkgname-$pkgver.tar.gz")
md5sums=('969f2f1f412c60e8ff1ea107f00a25b1')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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

