upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / jumpy / trunk / PKGBUILD
blob5c3368f3518aa9a81d09d1dc2ccd538bb7043469
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Contributor: kleintux <reg-archlinux AT klein DOT tuxli DOT ch>
4 pkgname=jumpy
5 pkgver=0.7.0
6 pkgrel=1
7 pkgdesc="Tactical 2D shooter in fishy pixels style"
8 arch=('x86_64')
9 url="https://fishfight.org"
10 license=('MIT' 'Apache')
11 depends=('pkg-config' 'mesa-libgl' 'alsa-lib' 'systemd-libs' 'libudev.so')
12 makedepends=('cargo' 'systemd')
13 replaces=('fishfight')
14 source=("$pkgname-$pkgver.tar.gz::https://github.com/fishfight/jumpy/archive/v$pkgver.tar.gz")
15 sha512sums=('17ac4cf7f56d06053f849980f1021d3d14bced08ce090dcad80964ca206f0eff7b29644d25faaa810397467ede0cbd7e15acf0e346903d22ad4221808bfee868')
16 options=('!lto')
18 prepare() {
19   cd "$pkgname-$pkgver"
20   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
23 build() {
24   cd "$pkgname-$pkgver"
25   cargo build --frozen --release
28 check() {
29   cd "$pkgname-$pkgver"
30   cargo test --frozen
33 package() {
34   cd "$pkgname-$pkgver"
35   mkdir -p "$pkgdir/opt/$pkgname"
36   install -Dm 755 "target/release/$pkgname" -t "$pkgdir/opt/$pkgname"
37   mkdir -p "$pkgdir/usr/bin"
38   ln -s "/opt/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
40   cp -r "assets" "$pkgdir/opt/$pkgname/"
41   find "$pkgdir/opt/$pkgname/assets/music/" -type f -exec chmod 444 {} \;
42   find "$pkgdir/opt/$pkgname/assets/player/sounds/" -type f -exec chmod 444 {} \;
44   install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
45   install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
46   install -Dm 644 licenses/LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
49 # vim: ts=2 sw=2 et: