# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Thomas Arnhold <thomas at arnhold dot org>

pkgname=liborcus
pkgver=0.21.0
pkgrel=2
pkgdesc="File import filter library for spreadsheet documents."
arch=('x86_64' 'aarch64')
url="https://gitlab.com/orcus/orcus/blob/master/README.md"
license=('MPL-2.0')
depends=('libixion' 'glibc' 'boost-libs' 'gcc-libs' 'zlib' 'python')
makedepends=('boost' 'mdds')
optdepends=('python-requests: in tool bugzilla')
source=(https://gitlab.com/api/v4/projects/orcus%2Forcus/packages/generic/source/${pkgver}/liborcus-${pkgver}.tar.xz)
# https://gitlab.com/orcus/orcus/-/releases
sha256sums=('1c6e473d6b8a63d61d0e6874a1762d6f0e0e78338d763e48ac93126ecde19b37')

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

check() {
    cd "${pkgname}"-${pkgver}
    make check
}

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