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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name redis |
---|
7 | version 2.6.14 |
---|
8 | categories databases |
---|
9 | license BSD |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | maintainers gmail.com:brianjlandau openmaintainer |
---|
13 | |
---|
14 | description Redis is an open source, advanced key-value store. |
---|
15 | long_description ${description} |
---|
16 | |
---|
17 | homepage http://redis.io/ |
---|
18 | master_sites googlecode:redis |
---|
19 | |
---|
20 | checksums sha256 fdf61c693e5c4908b4bb44c428d4a2b7568f05566c144c58fdf19c5cb12a9caf |
---|
21 | |
---|
22 | patchfiles patch-redis.conf.diff |
---|
23 | |
---|
24 | post-patch { |
---|
25 | reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/redis.conf |
---|
26 | } |
---|
27 | |
---|
28 | use_configure no |
---|
29 | |
---|
30 | variant universal {} |
---|
31 | |
---|
32 | build.args-append CC="${configure.cc} [get_canonical_archflags cc]" |
---|
33 | |
---|
34 | # disable silent rules |
---|
35 | build.args-append V=1 |
---|
36 | |
---|
37 | destroot.keepdirs ${destroot}${prefix}/var/db/redis |
---|
38 | |
---|
39 | destroot { |
---|
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 | |
---|
52 | post-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 | |
---|
60 | startupitem.create yes |
---|
61 | startupitem.executable ${prefix}/bin/redis-server ${prefix}/etc/redis.conf |
---|
62 | |
---|
63 | notes " |
---|
64 | If 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 | " |
---|