we changed the prefix... there too
[xonotic/gmqcc.git] / distro / archbsd / git / PKGBUILD
1 # Contributor: matthiaskrgr <matthiaskrgr _strange_curverd_character_ freedroid D0T org>
2 # Contributor: Wolfgang Bumiller <blub@speed.at>
3
4 pkgname=gmqcc-git
5 pkgver=20130127
6 pkgrel=1
7 pkgdesc="An Improved Quake C Compiler"
8 arch=('i686' 'x86_64')
9 depends=()
10 conflicts=('gmqcc')
11 provides=('gmqcc=0.2.4')
12 makedepends=('git')
13 url="https://github.com/graphitemaster/gmqcc.git"
14 license=('MIT')
15
16 _gitroot="git://github.com/graphitemaster/gmqcc.git"
17 _gitname="gmqcc"
18
19 build() {
20         cd $srcdir
21         msg "Connecting to the GIT server..."
22         if [[ -d $srcdir/$_gitname ]] ; then
23                 cd $_gitname
24                 msg "Removing build files..."
25                 git clean -dfx
26                 msg "Updating..."
27                 git pull --no-tags
28                 msg "The local files are updated."
29         else
30                 msg "Cloning..."
31                 git clone $_gitroot $_gitname --depth 1
32                 msg "Clone done."
33         fi
34
35         msg "Starting compilation..."
36         cd "$srcdir"/"$_gitname"
37
38         msg "Compiling..."
39         gmake
40 }
41
42 check() {
43         cd "$srcdir"/"$_gitname"
44         gmake check
45 }
46
47 package() {
48         cd "$srcdir"/"$_gitname"
49         msg "Compiling and installing to pkgdir this time..."
50         gmake install DESTDIR=$pkgdir PREFIX=/usr
51         msg "Compiling done."
52
53         install -dm755 ${pkgdir}/usr/share/licenses/gmqcc
54         install -m644 LICENSE ${pkgdir}/usr/share/licenses/gmqcc/LICENSE
55 }