Package Details: 2048-rs 0.5.0-1

Git Clone URL: https://aur.archlinux.org/2048-rs.git (read-only, click to copy)
Package Base: 2048-rs
Description: A very pretty cli implementation of the popular 2048 game written in rust
Upstream URL: https://github.com/pierrechevalier83/2048-rs
Licenses: MIT
Submitter: pierrechevalier
Maintainer: pierrechevalier
Last Packager: pierrechevalier
Votes: 4
Popularity: 0.000000
First Submitted: 2017-03-07 03:06 (UTC)
Last Updated: 2017-08-13 09:44 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

HurricanePootis commented on 2024-10-29 18:53 (UTC) (edited on 2024-10-29 18:53 (UTC) by HurricanePootis)

You should make the following changes to your package:

  1. Add a prepare() to fetch dependencies
  2. Add envars for rustup users in build() and prepare()
  3. Add glibc and gcc-libs to your depends()
  4. Update to 0.5.1

Here is a patch file:

diff --git a/PKGBUILD b/PKGBUILD
index bf230f4..ed352d1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,19 +2,28 @@

 pkgname=2048-rs
 _pkgname=game-2048
-pkgver=0.5.0
+pkgver=0.5.1
 pkgrel=1
 pkgdesc="A very pretty cli implementation of the popular 2048 game written in rust"
 url="https://github.com/pierrechevalier83/2048-rs"
 makedepends=('cargo')
+depends=('gcc-libs' 'glibc')
 arch=('i686' 'x86_64')
 license=('MIT')
 source=("$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/$_pkgname/$pkgver/download")
-sha256sums=('7b4c6bb8bc283427b2faac0817c0d14dcf97a04c07436f76076b941be7ddb07d')
+sha256sums=('ce3f98ac1bce117a108d93e7d87b9911f3df82f3d1a49abe197366cb0fd28981')
+
+prepare(){
+  cd "$_pkgname-$pkgver"
+  export RUSTUP_TOOLCHAIN=stable
+  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
+}

 build() {
   cd "$_pkgname-$pkgver"
-  cargo build --release
+  export RUSTUP_TOOLCHAIN=stable
+  export CARGO_TARGET_DIR=target
+  cargo build --release --frozen --all-features
 }

 package() {