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