forked from snazzy-d/sdc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
43 lines (35 loc) · 796 Bytes
/
PKGBUILD
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
43
pkgname=sdc-git
pkgver=20120131
pkgrel=1
pkgdesc="sdc, the stupid D compiler"
arch=('i686' 'x86_64')
license=('GPL')
depends=('llvm>=3.0' 'dmd')
makedepends=('git')
provides=('sdc')
conflicts=('sdc')
_gitroot="https://github.com/bhelyer/SDC.git"
_gitname="SDC"
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..."
cd "$srcdir/$_gitname"
if [ ! -e llvm ] ; then
ln -s /usr/lib/llvm .
fi
if [ `uname -m` == "i686" ] ; then
make ARCHFLAG=-m32
else
make ARCHFLAG=-m64
fi
mkdir -p "$pkgdir/usr/bin"
cp -r bin/sdc "$pkgdir/usr/bin/sdc"
}