summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9f269c173ef58261391961da7b866caad9cacfaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
# Contributor: abdus <nail@abdus.xyz>
# Contributor: Jack Rubacha <rubacha.jack03@gmail.com>
# Contributor: Frederic Bezies <fredbezies at gmail dot com>

pkgname=2048.c
pkgver=1.0.3.r4.g4645182
pkgrel=2
epoch=1
pkgdesc="A terminal 2048 written in c"
arch=('x86_64' 'i686' 'aarch64')
url="https://github.com/mevdschee/2048.c"
license=('MIT')
depends=('glibc' 'hicolor-icon-theme')
source=(git+https://github.com/mevdschee/2048.c.git#commit=464518299836a0fe843221edfddae5ddc05b7920)
sha256sums=('78cd036e27fafe2479d380a48a39045d3db909110a1348abe2dd81b990c7e97f')

pkgver() {
  cd "$pkgname"
  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | cut -c2-48
}

build() {
    cd "${srcdir}/${pkgname}"
    make
}

package() {
      cd "${srcdir}/${pkgname}"

      install -Dm755 2048 "$pkgdir/usr/bin/${pkgname}"
      install -Dm644 "debian_${pkgname::-2}.png" "${pkgdir}/usr/share/icons/hicolor/128x128/apps/$pkgname.png"
      install -Dm644 "${pkgname::-2}.desktop" "${pkgdir}/usr/share/applications/$pkgname.desktop"
      install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" 'LICENSE'

      sed -i 's/2048/2048.c/g' "$pkgdir/usr/share/applications/$pkgname.desktop"
}