summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1a040b74d59ea2fc0ed19ecf2b35c22b6a5c4c67 (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
# Maintainer: Axilleas Pi <axilleas@archlinux.gr>

pkgname=pewpew-git
pkgver=20120322
pkgrel=1
pkgdesc="A cool retro shooting game"
arch=('i686' 'x86_64')
url="https://github.com/mastergreg/pewpew"
license=('GPL3')
depends=('freeglut' 'freealut')
makedepends=('git' 'freeglut' 'freealut')

_gitroot="git://github.com/mastergreg/pewpew.git"
_gitname="pewpew"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  export LDFLAGS=${LDFLAGS//,--as-needed}
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$_gitname-build"
  make DESTDIR="$pkgdir/" install
}