makedepends=(cmake)

description="Simple XML parser made for easy integration"
url="https://github.com/leethomason/tinyxml2"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="tinyxml2"
version="11.0.0"
release=1

PKGMK_KEEP_SOURCES='no'

source=(https://github.com/leethomason/tinyxml2/archive/$version.tar.gz)

build() { 

    cmake -B build \
          -S "$name-$version" \
          -D CMAKE_INSTALL_PREFIX=/usr \
          -D tinyxml2_SHARED_LIBS=ON

    cmake --build build
    DESTDIR="$PKG" cmake --install build

    install -vDm644 "$name-$version/LICENSE.txt" "$PKG/usr/share/licenses/$name/LICENSE"
}
