source: trunk/dports/databases/rethinkdb/Portfile

Last change on this file was 149599, checked in by ciserlohn@…, 17 months ago

nodejs, nodejs-devel, nodejs4, nodejs5, nodejs6: new naming scheme

  • Rename nodejs to nodejs4.
  • Rename nodejs-devel to nodejs6.
  • New port nodejs5.
  • Update to the latest versions (4.4.6, 5.12.0, 6.2.2).
  • Remove ssl variant. Always build with ssl support enabled.
  • Remove python2.6 and python2.7 variants. Always use python2.7 as python2.6 is EOL.
  • Remove dtrace variant. It does nothing and was only for legacy compatibility.
  • Update all dependent ports.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 149599 2016-06-27 20:48:58Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7name                rethinkdb
8version             1.11.1
9revision            1
10categories          databases
11platforms           darwin
12maintainers         nomaintainer
13license             AGPL-3
14
15description         open-source distributed database
16
17long_description    ${name} is an ${description} that has an intuitive query \
18                    language, automatically parallelized queries, and simple \
19                    administration.
20
21homepage            http://www.rethinkdb.com/
22master_sites        http://download.rethinkdb.com/dist/
23extract.suffix      .tgz
24
25checksums           rmd160  e615a2031d0b3597e464d585becf6e25a9b51bdb \
26                    sha256  48941171acd91ba41b97cef38f75fd0d8b8805eca767941f07e4e5c06df4b7a3
27
28depends_build       port:coffee-script
29
30depends_lib         port:boost \
31                    port:v8 \
32                    path:bin/node:nodejs4 \
33                    port:protobuf-cpp
34
35# nodejs only supports Intel processors and is not universal
36supported_archs     i386 x86_64
37universal_variant   no
38
39# Error: GCC 4.2.2 is too old. At least GCC 4.4.3 is required
40compiler.blacklist-append apple-gcc* gcc-3.3 gcc-4.* *llvm-gcc-4.2 macports-gcc-4.2 macports-gcc-4.3
41
42# Xcode 3.2.x included clang but not clang++, so it used llvm-g++-4.2 instead.
43compiler.blacklist-append {clang < 137}
44
45platform darwin {
46    if {${configure.cxx_stdlib} eq "libstdc++"} {
47        # When protobuf-cpp and v8 are compiled against libstdc++, don't use
48        # clang, which only supports C++11 (required by rethinkdb) when using
49        # libc++.
50        compiler.blacklist-append   *clang*
51        # without this, no compilers are available at all
52        compiler.fallback-append    macports-gcc-4.8
53    }
54}
55
56# v8 >= 3.21 compatibility from upstream
57patch.pre_args      -p1
58patchfiles          3cf9e7bf13e5f0f364aecf0913e09d704e9688d2.patch
59
60set webresdir       ${prefix}/share/${name}/web
61build.args          DEBUG=0 ALLOW_WARNINGS=1 BUILD_DIR=build WEBRESDIR=${webresdir}
62build.target        build/rethinkdb web-assets
63
64set dbdir             ${prefix}/var/db/${name}/
65set logdir            ${prefix}/var/log/${name}/
66set default_instance  default
67set config_file       ${prefix}/etc/rethinkdb/${default_instance}.conf
68
69set rethinkuser     _${name}
70add_users           ${rethinkuser} group=${rethinkuser} realname=RethinkDB\ Server
71
72destroot.keepdirs   ${destroot}${dbdir} \
73                    ${destroot}${logdir}
74
75post-patch {
76    reinplace "s|# directory=/var/lib/rethinkdb/default|directory=${dbdir}${default_instance}|" \
77        ${worksrcpath}/packaging/assets/config/default.conf.sample
78}
79
80destroot {
81    # TODO: explore using "make install DESTDIR=xxx" instead of copying all files to destroot manually?
82    xinstall ${worksrcpath}/build/rethinkdb ${destroot}${prefix}/bin/
83    xinstall -d ${destroot}${prefix}/etc/rethinkdb
84    xinstall -m 644 ${worksrcpath}/packaging/assets/config/default.conf.sample ${destroot}${config_file}.sample
85    xinstall -d ${destroot}${prefix}/etc/bash_completion.d/
86    xinstall -m 644 ${worksrcpath}/packaging/assets/scripts/rethinkdb.bash ${destroot}${prefix}/etc/bash_completion.d/
87    xinstall -m 644 ${worksrcpath}/packaging/assets/man/rethinkdb.1 ${destroot}${prefix}/share/man/man1/
88    xinstall -d ${destroot}${prefix}/share/${name}/
89    move ${worksrcpath}/build/rethinkdb_web_assets/ ${destroot}${webresdir}
90
91    xinstall -m 755 -o ${rethinkuser} -g ${rethinkuser} -d \
92        ${destroot}${dbdir} \
93        ${destroot}${logdir}
94}
95
96# TODO: create db and default config file in case if they are absent
97notes "You can start rethinkdb as service. For that you need:
98    - create default database: 'sudo -u ${rethinkuser} rethinkdb create -d ${dbdir}${default_instance}'
99    - create and edit config file for the default database: 'cp ${config_file}.sample ${config_file}'
100    - load service:  'sudo port load ${startupitem.name}'"
101
102startupitem.create      yes
103startupitem.executable  sudo -u ${rethinkuser} ${prefix}/bin/rethinkdb serve --config-file ${config_file}
104
105livecheck.type      regex
106livecheck.url       ${master_sites}
107livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.