summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0edb5e568d9685def4b2114fe406e7f035ad0fd6 (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
39
40
41
42
43
# Maintainer: Renato Lui Geh <renatogeh at gmail dot com>
pkgname=marvinc-git
_gitname=MarvInc
_lpkg="${_gitname,,}"
pkgver=1.4.1.r0.g6acf76c
pkgrel=1
pkgdesc="MarvInc is a zachlike puzzle game with a story told through emails."
arch=('x86_64')
url="https://github.com/MarvellousSoft/MarvInc/"
license=('GPL')
depends=('love10')
provides=("${_lpkg}")
conflicts=("${_lpkg}")
source=('git+https://github.com/MarvellousSoft/MarvInc#branch=master')
md5sums=('SKIP')

prepare() {
  cd "$_gitname"
  git checkout master
  git pull
}

pkgver() {
  cd "$_gitname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v\(.*\)/\1/'
}

build() {
  cd "$_gitname"
  printf '#!/bin/bash\nlove10 %s' "$HOME/.marvinc/marv" > run.sh
  chmod +x run.sh
}

package() {
  cd "$_gitname"

  mkdir -p "$pkgdir$HOME/.marvinc"
  cp -r * "$pkgdir$HOME/.marvinc/"

  mkdir -p "$pkgdir/usr/bin"
  ln -s "$HOME/.marvinc/run.sh" "$pkgdir/usr/bin/marvinc"
}