summaryrefslogtreecommitdiff
path: root/community/mongodb/PKGBUILD
blob: 733eaa629c1c0001a6608302b20a3a5923a37fa9 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# $Id: PKGBUILD 72741 2012-06-22 06:12:23Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Mathias Stearn <mathias@10gen.com>
# Contributor: Alec Thomas

pkgname=mongodb
pkgver=2.0.6
pkgrel=1
pkgdesc='A high-performance, open source, schema-free document-oriented database.'
arch=('i686' 'x86_64')
url='http://www.mongodb.org'
license=('AGPL3')
depends=('boost-libs')
makedepends=('scons' 'boost')
#checkdepends=('python2-pymongo')
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'
        '0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch'
        '0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch')
md5sums=('b3b32fecdcbe8e8068ec2989be9d2da4'
         '9c67e00f4626ad761a8f7d4e037a54d7'
         '4839fe1d638187ca3226e8267b947318'
         'fdbf06b005b3a73a2b6caca257ec8f64'
         '659f6538f1ee3292809f638a4a37cbad')

build() {
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-src-r${pkgver}

  # 0001 suggested to backport along with 0002
  # 0002 backported for https://jira.mongodb.org/browse/SERVER-5358
  #      also fixes https://bugs.archlinux.org/task/29050
  #patch -Np1 -i ${srcdir}/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch
  #patch -Np1 -i ${srcdir}/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch

  # fix python name for smoke tests
  #sed \
  #  -e 's/python/&2/' \
  #  -i SConstruct

  scons \
    all \
    --full
}

<<COMMENT
check() {
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-src-r${pkgver}

  scons \
    smokeAll \
    --smokedbprefix=${srcdir}
}
COMMENT

package() {
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-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/lib/mongodb
  install -d -m755 ${pkgdir}/var/log/mongodb

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