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

pkgname=nauty
epoch=1
pkgver=2.9.1
pkgrel=1
pkgdesc='A program for computing automorphism groups of graphs and digraphs'
arch=(x86_64 aarch64)
url='http://pallini.di.uniroma1.it/'
license=(Apache-2.0)
depends=(glibc)
source=(http://pallini.di.uniroma1.it/nauty${pkgver//./_}.tar.gz)
sha256sums=('488fa906d10a372c72d2364c5dee48e0f7307004fbe52c2bce50c52de8cd873e')
 
build() {
  cd nauty${pkgver//./_}

# Workaround build system discarding LDFLAGS
  CFLAGS="$CFLAGS $LDFLAGS" \
  ./configure \
    --prefix=/usr \
    --includedir=/usr/include/nauty \
    --enable-generic
  make
}

package() {
  cd nauty${pkgver//./_}

  make DESTDIR="$pkgdir" install
  mkdir -p "$pkgdir"/usr/share/licenses/nauty
  install COPYRIGHT "$pkgdir"/usr/share/licenses/nauty/LICENSE
}
