updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / mongodb-git / PKGBUILD
blobc48b9a9ff78fac28eec7354c0ff2f26b9233d690
1 # Contributor: Latchezar Tzvetkoff <root@pfoo.org>
3 pkgname=mongodb-git
4 pkgver=20100802
5 pkgrel=1
6 pkgdesc='MongoDB is a high-performance, open source, schema-free document-oriented database.'
7 arch=('i686' 'x86_64')
8 url='http://www.mongodb.org/'
9 license=('AGPL')
10 depends=('boost' 'spidermonkey' 'pcre' 'xulrunner')
11 makedepends=('git' 'scons')
12 conflicts=('mongodb')
13 install='mongodb.install'
14 source=('mongodb.rc'
15         'mongodb.rc.conf')
16 md5sums=('4bebe428216b1c4792fd1b7941102b7b'
17          '13d59a1cb6fa9e54814d6d98781341dc')
19 _gitroot='http://github.com/mongodb/mongo.git'
20 _gitname='mongo'
22 build() {
23   #
24   # SOURCE CHECKOUT
25   #
26   cd "$srcdir"
27   msg "Connecting to GIT server...."
29   if [ -d $_gitname ] ; then
30     cd $_gitname && git pull origin
31     msg "The local files are updated."
32   else
33     git clone $_gitroot $_gitname
34   fi
36   msg "GIT checkout done or server timeout"
37   msg "Starting make..."
39   rm -rf "$srcdir/$_gitname-build"
40   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
41   cd "$srcdir/$_gitname-build"
44   #
45   # BUILD
46   #
48   # fix multilib
49   sed -i 's|lib64|lib|g' SConstruct
51   # install and build
52   scons install --prefix="$startdir/pkg/usr/"
53   install -Dm 755 "$startdir/mongodb.rc" "$startdir/pkg/etc/rc.d/mongodb"
54   install -Dm 755 "$startdir/mongodb.rc.conf" "$startdir/pkg/etc/conf.d/mongodb"
55   install -dm 700 "$startdir/pkg/var/state/mongodb"