updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / factor-git / PKGBUILD
blob5b227b50cbc940f552177cd04fb514b067404bd6
1 # Contributor: jedahu <jedahu@gmail.com>
2 pkgname=factor-git
3 pkgver=20100302
4 pkgrel=1
5 pkgdesc="Factor is a general purpose, dynamically typed, stack-based programming language."
6 arch=(i686 x86_64)
7 url="http://factorcode.org"
8 license=(BSD)
9 provides=(factor)
10 conflicts=(factor)
11 depends=(pango freetype2 mesa libgl)
12 optdepends=(udis86)
13 makedepends=(git gcc)
14 source=('f' 'update.sh')
15 md5sums=('57fadc2cfdfd6c58717bdb59846801a1' '0cf96c65fa4105eee1cb90c27fc75ecf')
17 _gitroot="git://factorcode.org./git/factor.git"
18 [ $GIT_PROTOCOL ] && _gitroot="$GIT_PROTOCOL://factorcode.org/git/factor.git"
19 _gitname="factor"
21 build() {
22     bootimg="boot.x86.32.image"
23     [ $CARCH = x86_64 ] && bootimg="boot.unix-x86.64.image"
25     cd $srcdir
27     if [ -d $_gitname ]; then
28         cd $startdir
29         msg "Running factor update script...."
30         sh update.sh || return 1
31     else
32         msg "Cloning GIT repository...."
33         git clone $_gitroot || return 1
34         cd $startdir
35         msg "Fetching bootstrap image...."
36         sh update.sh fetch || return 1
37     fi
39     echo $startdir
40     mkdir -p $startdir/pkg/usr/bin
41     mkdir -p $startdir/pkg/usr/lib/factor
42     mkdir -p $startdir/pkg/usr/share/factor
44     cd src/factor
46     cp factor $startdir/pkg/usr/bin/f-bin
47     cp $startdir/f $startdir/pkg/usr/bin/f
48     chmod 0755 $startdir/pkg/usr/bin/*
50     cp -a misc extra core basis $startdir/pkg/usr/lib/factor/
51     cp $bootimg $startdir/pkg/usr/share/factor/boot.image