summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: baa1a31118610783b0ff075ee669508136f79065 (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
# Maintainer: Ashley Towns <mail {at} ashleytowns {dot} id {dot} au>

pkgname=swen
pkgver=28.91c5b6b
pkgrel=1
pkgdesc="A toy 2d game engine written in swift using SDL2"
arch=('any')
url="https://github.com/aktowns/${pkgname}"
license=('apache')
depends=('sdl2' 'sdl2_gfx' 'sdl2_image' 'sdl2_net' 'sdl2_ttf' 'sdl2_mixer' 'chipmunk' 'libxml2' 'swift-bin')
makedepends=('git')
source=(${pkgname}::"git+https://github.com/aktowns/${pkgname}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"
  echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

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

package() {
  # make -C "${srcdir}/${pkgname}" DESTDIR="${pkgdir}" install
  mkdir -p "${pkgdir}/usr/bin"
  cp "${srcdir}/${pkgname}/.build/debug/SwenDemo" "${pkgdir}/usr/bin"
}