~comcloudway/ccw-aports

48f17fc5cf90653dda112271d0bdf272b6fd18b3 — Jakob Meier 1 year, 1 month ago 7be0312
testing/suitsquad: install missing assets
3 files changed, 37 insertions(+), 7 deletions(-)

M testing/suitsquad/APKBUILD
A testing/suitsquad/fix-icon.patch
A testing/suitsquad/fix-musl.patch
M testing/suitsquad/APKBUILD => testing/suitsquad/APKBUILD +15 -7
@@ 3,25 3,27 @@ pkgname=suitsquad
pkgver=0
pkgrelease=stable
pkgrel=0
pkgdesc="This is a crossplatform gui reimplementation of my suits solitaire version."
pkgdesc="crossplatform gui solitaire game"
url="https://codeberg.org/comcloudway/suitsquad/"
arch="all"
license="GPL-3"
depends=""
makedepends="cargo"
checkdepends=""
install=""
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/comcloudway/suitsquad/archive/$pkgrelease.tar.gz"
source="
	$pkgname-$pkgver.tar.gz::https://codeberg.org/comcloudway/suitsquad/archive/$pkgrelease.tar.gz
	fix-icon.patch
	fix-musl.patch
"
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare

	cargo fetch --locked
	cargo fetch
	cargo update -p libc
}

build() {
	cargo build --frozen --release
	cargo build --release
}

check() {


@@ 31,8 33,14 @@ check() {
package() {
	cargo install --frozen --offline --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*

 # install assets
	install -d $pkgdir/usr/share/$pkgname
	install -Dm644 $builddir/assets/icon.png $pkgdir/usr/share/$pkgname
}

sha512sums="
97c7a2448cd1457f560a3ccb260cd206fc7b0b1ed35cb54d76469828576ac13be6ac50746c779a469b531759bafd01a8a572605e1ef002a9db93ec4b6dc0fcf0  suitsquad-0.tar.gz
fbdad6df6cbb9782a81eb97f39a17b91d341922961cd0eef4a4d2876fb409ab6b798d6bd60f168d79615b4bd62f6e672012b01ee52cbdde3efd2206eb98505f1  fix-icon.patch
167c2389507657641925152110f98b003667cee45c10cd3db7556e2a89b6f667429119e79b36146707defe26fe2c17afa2fba298edb12784f3371033ac2bb376  fix-musl.patch
"

A testing/suitsquad/fix-icon.patch => testing/suitsquad/fix-icon.patch +11 -0
@@ 0,0 1,11 @@
--- a/src/main.rs
+++ b/src/main.rs
@@ -81,7 +81,7 @@
             }
             #[cfg(not(target_os="android"))]
             {
-                "icon.png"
+                "/usr/share/suitsquad/icon.png"
             }
         };
 

A testing/suitsquad/fix-musl.patch => testing/suitsquad/fix-musl.patch +11 -0
@@ 0,0 1,11 @@
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,6 +24,8 @@
 
 [patch.crates-io]
 sapp-android = { git = "https://github.com/sonicrules1234/miniquad" }
+getrandom = { git = "https://github.com/comcloudway/getrandom" }
+libc = { git = "https://github.com/rust-lang/libc" }
 
 [dev-dependencies]
 pretty_assertions = "0.6"