pkgname: layers pkgver: '1.17.0' pkgrel: '1' pkgdesc: 'laye-rs animated scene graph and rendering engine' url: 'https://github.com/nongio/layers' arch: x86_64 license: - MIT depends: [] makedepends: - rustc - cmake - make - pkgconf - xorg-libdrm - mesa - wayland source: - 'https://github.com/nongio/layers/archive/refs/tags/v${pkgver}.tar.gz' sha256sums: - SKIP build: | cd layers-${pkgver} # Brak Cargo.lock w wydaniu upstream, dlatego bez --locked. cargo build --release package: | cd layers-${pkgver} if [ ! -f target/release/liblayers.so ]; then echo "brak target/release/liblayers.so - build nie wytworzyl biblioteki" >&2 exit 1 fi install -Dm755 target/release/liblayers.so "${PKGDIR}/usr/lib/liblayers.so" # cbindgen zapisuje naglowek jako .h, czyli laye-rs.h. _hdr=$(find target -maxdepth 1 -type f -name '*.h' | head -1) if [ -n "${_hdr}" ]; then install -Dm644 "${_hdr}" "${PKGDIR}/usr/include/layers.h" else echo "uwaga: cbindgen nie wygenerowal naglowka - pomijam /usr/include/layers.h" >&2 fi # Wydanie upstream nie zawiera pliku LICENSE (GitHub: license=null), # wiec instalacja licencji jest warunkowa. for _lic in LICENSE LICENSE.txt COPYING COPYING.txt; do if [ -f "${_lic}" ]; then install -Dm644 "${_lic}" "${PKGDIR}/usr/share/licenses/${pkgname}/${_lic}" break fi done