summaryrefslogtreecommitdiff
path: root/community/mongodb/PKGBUILD
blob: 0d3c48c5a3623854e083bea937fd4009d1e21afb (plain)
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
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Mathias Stearn <mathias@10gen.com>
# Contributor: Alec Thomas

pkgname=mongodb
pkgver=1.8.1
pkgrel=1
pkgdesc='A high-performance, open source, schema-free document-oriented database.'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.mongodb.org'
license=('AGPL3')
depends=('boost-libs' 'spidermonkey' 'pcre')
makedepends=('scons' 'boost')
optdepends=('libpcap: needed for mongosniff')
backup=('etc/mongodb.conf')
install="mongodb.install"
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
        'mongodb.rc'
        'mongodb.conf')
md5sums=('e75a5cae641a53760df8cb866ad5d929'
         '859f8f9bb32ef2bd21fec55ae9a87d0a'
         '9e0ea3f96732bb7811f0b64dace56440')

build() {
  export SCONSFLAGS="$MAKEFLAGS"

  cd ${pkgname}-src-r${pkgver}

  # scons is "special"
  sed -i 's/-Wall -Wsign-compare/& -DBOOST_FILESYSTEM_VERSION=2/' SConstruct

  scons \
    all \
    --full
}

package() {
  cd ${pkgname}-src-r${pkgver}

  scons \
    install \
    --full \
    --prefix=${pkgdir}/usr

  install -D -m755 ${srcdir}/mongodb.rc \
    ${pkgdir}/etc/rc.d/mongodb
  install -D -m644 ${srcdir}/mongodb.conf \
    ${pkgdir}/etc/mongodb.conf
  install -d -m700 ${pkgdir}/var/state/mongodb

  if [ -d ${pkgdir}/usr/lib64 ]; then
    mv ${pkgdir}/usr/lib64 ${pkgdir}/usr/lib
  fi
}