# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=taglib
pkgver=2.0.1
pkgrel=1
pkgdesc='A Library for reading and editing the meta-data of several popular audio formats'
arch=(x86_64)
url='https://taglib.github.io/'
license=(LGPL-2.1-only
         MPL-1.1)
depends=(gcc-libs
         glibc
         sh
         zlib)
makedepends=(cmake
             utf8cpp)
checkdepends=(cppunit)
source=(https://taglib.github.io/releases/$pkgname-$pkgver.tar.gz)
sha256sums=('08c0a27b96aa5c4e23060fe0b6f93102ee9091a9385257b9d0ddcf467de0d925')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS -DNDEBUG"
  cmake --build build
}

check() {
  cmake --build build --target test
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
