| 1 | # Packages the foundation shell from the git checkout that invoked makepkg. |
| 2 | # PAPERDOLL_PKGVER and REPO_ROOT are set by scripts/package/arch.sh. |
| 3 | pkgname=paperdoll-renderer |
| 4 | pkgver=0.1.0 |
| 5 | pkgrel=1 |
| 6 | pkgdesc='Foundation shell for the Paperdoll Renderer. Import and render are not included.' |
| 7 | arch=('x86_64') |
| 8 | url='https://git.timfalken.com/golden-age/paperdoll-renderer' |
| 9 | license=('MIT') |
| 10 | depends=('gcc-libs' 'glibc' 'libxcb' 'libx11' 'libxkbcommon' 'libglvnd') |
| 11 | makedepends=('cargo' 'pkgconf') |
| 12 | options=('!debug' '!lto') |
| 13 | |
| 14 | pkgver() { |
| 15 | printf '%s\n' "${PAPERDOLL_PKGVER:?set PAPERDOLL_PKGVER}" |
| 16 | } |
| 17 | |
| 18 | build() { |
| 19 | : "${REPO_ROOT:?set REPO_ROOT to the repository root}" |
| 20 | export CARGO_HOME="${CARGO_HOME:-$REPO_ROOT/cargo-home}" |
| 21 | cargo build --release --locked --manifest-path "$REPO_ROOT/Cargo.toml" --target-dir "$REPO_ROOT/target" |
| 22 | } |
| 23 | |
| 24 | package() { |
| 25 | : "${REPO_ROOT:?set REPO_ROOT to the repository root}" |
| 26 | install -Dm755 "$REPO_ROOT/target/release/paperdoll-renderer" "$pkgdir/usr/bin/paperdoll-renderer" |
| 27 | install -Dm644 "$REPO_ROOT/packaging/linux/paperdoll-renderer.desktop" \ |
| 28 | "$pkgdir/usr/share/applications/paperdoll-renderer.desktop" |
| 29 | install -Dm644 "$REPO_ROOT/packaging/linux/icon-64.png" \ |
| 30 | "$pkgdir/usr/share/icons/hicolor/64x64/apps/paperdoll-renderer.png" |
| 31 | install -Dm644 "$REPO_ROOT/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 32 | } |