Ticket #38497: rethinkdb_update.diff
File rethinkdb_update.diff, 3.8 KB (added by anatol (Anatol Pomozov), 12 years ago) |
---|
-
Portfile
5 5 PortGroup compiler_blacklist_versions 1.0 6 6 7 7 name rethinkdb 8 version 1.4. 08 version 1.4.1 9 9 categories databases 10 10 platforms darwin 11 11 maintainers nomaintainer … … 21 21 master_sites http://download.rethinkdb.com/dist/ 22 22 extract.suffix .tgz 23 23 24 checksums rmd160 4b6a7ca9ac167848ba3b0877b9a94a8a92535440\25 sha256 da40ac64a0eac9d6b76452bed4ab9189eaa960c143479d862170d564253fdc5a24 checksums rmd160 b23443ce118056e4a2217c786f41028ec8f58d44 \ 25 sha256 ba5da17b59df9055b4384f015965efd55c05bcd443526dc766a92516e6411ed7 26 26 27 depends_build port:coffee-script 28 27 29 depends_lib port:boost \ 28 30 port:v8 \ 29 31 path:bin/node:nodejs \ 30 port:protobuf-cpp \ 31 port:coffee-script 32 port:protobuf-cpp 32 33 33 34 # nodejs only supports Intel processors and is not universal 34 35 supported_archs i386 x86_64 … … 63 64 build.args DEBUG=0 ALLOW_WARNINGS=1 BUILD_DIR=build WEBRESDIR=${webresdir} 64 65 build.target build/rethinkdb web-assets 65 66 66 destroot.keepdirs ${destroot}${prefix}/var/lib/rethinkdb/ 67 set dbdir ${prefix}/var/db/${name}/ 68 set logdir ${prefix}/var/log/${name}/ 69 set default_instance default 70 set config_file ${prefix}/etc/rethinkdb/${default_instance}.conf 67 71 72 set rethinkuser _${name} 73 add_users ${rethinkuser} group=${rethinkuser} realname=RethinkDB\ Server 74 75 destroot.keepdirs ${destroot}${dbdir} \ 76 ${destroot}${logdir} 77 78 post-patch { 79 reinplace "s|# directory=/var/lib/rethinkdb/default|directory=${dbdir}${default_instance}|" \ 80 ${worksrcpath}/packaging/assets/config/default.conf.sample 81 } 82 68 83 destroot { 84 # TODO: explore using "make install DESTDIR=xxx" instead of copying all files to destroot manually? 69 85 xinstall ${worksrcpath}/build/rethinkdb ${destroot}${prefix}/bin/ 70 xinstall -m 644 ${worksrcpath}/packaging/assets/man/rethinkdb.1 ${destroot}${prefix}/share/man/man1/ 71 xinstall -d ${destroot}${prefix}/etc/rethinkdb/instances.d/ 72 xinstall -m 644 ${worksrcpath}/packaging/assets/config/default.conf.sample ${destroot}${prefix}/etc/rethinkdb/ 86 xinstall -d ${destroot}${prefix}/etc/rethinkdb 87 xinstall -m 644 ${worksrcpath}/packaging/assets/config/default.conf.sample ${destroot}${config_file}.sample 73 88 xinstall -d ${destroot}${prefix}/etc/bash_completion.d/ 74 89 xinstall -m 644 ${worksrcpath}/packaging/assets/scripts/rethinkdb.bash ${destroot}${prefix}/etc/bash_completion.d/ 90 xinstall -m 644 ${worksrcpath}/packaging/assets/man/rethinkdb.1 ${destroot}${prefix}/share/man/man1/ 75 91 xinstall -d ${destroot}${prefix}/share/${name}/ 76 92 move ${worksrcpath}/build/rethinkdb_web_assets/ ${destroot}${webresdir} 77 93 78 # startup script ? 94 xinstall -m 755 -o ${rethinkuser} -g ${rethinkuser} -d \ 95 ${destroot}${dbdir} \ 96 ${destroot}${logdir} 79 97 } 80 98 99 # TODO: create db and default config file in case if they are absent 100 notes "You can start rethinkdb as service. For that you need: 101 - create default database: 'sudo -u ${rethinkuser} rethinkdb create -d ${dbdir}${default_instance}' 102 - create and edit config file for the default database: 'cp ${config_file}.sample ${config_file}' 103 - load service: 'sudo port load ${name}'" 104 105 startupitem.create yes 106 startupitem.executable sudo -u ${rethinkuser} ${prefix}/bin/rethinkdb serve --config-file ${config_file} 107 81 108 livecheck.type regex 82 109 livecheck.url ${master_sites} 83 110 livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}