Ticket #39959: Portfile

File Portfile, 1.8 KB (added by calvin@…, 11 years ago)

redis 2.6.14

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 103972 2013-03-11 09:43:26Z stromnov@macports.org $
3
4PortSystem          1.0
5
6name                redis
7version             2.6.14
8categories          databases
9license             BSD
10platforms           darwin
11
12maintainers         gmail.com:brianjlandau openmaintainer
13
14description         Redis is an open source, advanced key-value store.
15long_description    ${description}
16
17homepage            http://redis.io/
18master_sites        googlecode:redis
19
20checksums                       sha256  fdf61c693e5c4908b4bb44c428d4a2b7568f05566c144c58fdf19c5cb12a9caf
21
22patchfiles          patch-redis.conf.diff
23
24post-patch {
25    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/redis.conf
26}
27
28use_configure       no
29
30variant universal {}
31
32build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"
33
34# disable silent rules
35build.args-append   V=1
36
37destroot.keepdirs   ${destroot}${prefix}/var/db/redis
38
39destroot {
40    xinstall -d ${destroot}${prefix}/var/db/redis
41    xinstall -m 0755 -W ${worksrcpath}/src \
42        redis-benchmark \
43        redis-check-aof \
44        redis-check-dump \
45        redis-cli \
46        redis-server \
47        ${destroot}${prefix}/bin
48    xinstall -m 0644 ${worksrcpath}/redis.conf \
49        ${destroot}${prefix}/etc/redis.conf.sample
50}
51
52post-activate {
53    if {![file exists ${prefix}/etc/redis.conf]} {
54        file copy ${prefix}/etc/redis.conf.sample ${prefix}/etc/redis.conf
55    }
56    xinstall -d ${prefix}/var/log
57    touch ${prefix}/var/log/redis.log
58}
59
60startupitem.create  yes
61startupitem.executable  ${prefix}/bin/redis-server ${prefix}/etc/redis.conf
62
63notes "
64If you prefer to start a redis server manually, rather than using 'port load', then use this command:
65
66    redis-server ${prefix}/etc/redis.conf
67"