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