# Maintainer: Jesus E. pkgname=metis pkgver=5.1.0 _debver=$pkgver _debrel=7 pkgrel=1 arch=('i686' 'x86_64') pkgdesc="A set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices" url='http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' license=('Apache-2.0') depends=('glibc') makedepends=('quilt' 'cmake') options=(docs) source=("https://deb.debian.org/debian/pool/main/m/metis/metis_${pkgver}.dfsg.orig.tar.xz" "https://deb.debian.org/debian/pool/main/m/metis/metis_${_debver}.dfsg-${_debrel}.debian.tar.xz") sha512sums=('77d662dfade6131e17b934ba1b7f02e41dec701cfb0e0f0afce420e3a02489611200e323e288d88cd8de004b4d491c6a115ce0a9f9a0df1caba9f5682c67f2f0' '40763674ec320a4cfd21ea2eb0d2432cd6f1846d3fbe83a24c74c654d0cdda12d6494f6249d3e0bf03be6f688b78b0c660f2c0a276f51819d9c2aaab700fa37e') prepare() { cd $pkgname-$pkgver if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi } build() { cmake -B build -S $pkgname-$pkgver \ -DCMAKE_INSTALL_PREFIX=/usr \ -DSHARED=ON cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build install -m644 -D $pkgname-$pkgver/LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname }