summaryrefslogtreecommitdiff
path: root/community/mongodb/PKGBUILD
blob: caf35813c3fe20ecf34f5b7b5c784f92a00ca559 (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
# $Id: PKGBUILD 108911 2014-04-07 12:17:25Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: 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.4.10
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' 'pcre' 'snappy' 'openssl' 'gperftools') # 'libsasl')
makedepends=('scons' 'boost' 'readline' 'ncurses' 'libpcap')
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.conf' 'mongodb.service' 'removeWerror.patch')

build() {
  # fucking mongo aint no fun to package
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-src-r${pkgver}

  # failed to build with -Werror since 2.4.0
  patch -Np1 -i "$srcdir/removeWerror.patch"

  scons all \
    --use-system-boost \
    --use-system-pcre \
    --use-system-snappy \
    --use-system-tcmalloc \
    --ssl \
    --sharedclient
    # --use-sasl-client
    # --use-system-v8
}

check() {
  # Tests not passing
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-src-r${pkgver}

  #scons smokeAll --smokedbprefix="$srcdir"
}

package() {
  export SCONSFLAGS="$MAKEFLAGS"

  cd mongodb-src-r${pkgver}

  scons install \
    --use-system-boost \
    --use-system-pcre \
    --use-system-snappy \
    --use-system-tcmalloc \
    --ssl \
    --sharedclient \
    --full \
    --prefix="$pkgdir/usr"
    # --use-sasl-client
    # --use-system-v8

  install -Dm644 "$srcdir/mongodb.conf" "$pkgdir/etc/mongodb.conf"
  install -Dm644 "$srcdir/mongodb.service" "$pkgdir/usr/lib/systemd/system/mongodb.service"
  install -dm700 "$pkgdir/var/lib/mongodb"
  install -dm755 "$pkgdir/var/log/mongodb"
}

sha512sums=('970364dda2dba18bf979a0fc8291d9656b3cc3ba0aec1ca26d81f14f833e355c023d19b3cfaa81704013bf2c0e732d72de08b0f8236dafe85a3ac4d51b87edc6'
            '05dead727d3ea5fe8af1a3c3888693f6b3e2b8cb7f197a5d793352e10d2c524e96c9a5c55ad2e88c1114643a9612ec0b26a2574b48a5260a9b51ec8941461f1c'
            '177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9'
            'e709f76fa71a10d6b72d2eeae65d715e0a0a7e6cb93704114f22db8662d7102de77bd1e6706049351beb159aaa04548cfe4b14fe6ee498a166c5ad54c8275f84')