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$ |
---|
3 | PortSystem 1.0 |
---|
4 | name GNUnet |
---|
5 | distname gnunet |
---|
6 | version 0.9.0pre1-r13253 |
---|
7 | categories net |
---|
8 | |
---|
9 | description GNUnet |
---|
10 | long_description GNUnet is a framework for secure peer-to-peer \ |
---|
11 | networking that does not use any centralized or \ |
---|
12 | otherwise trusted services. |
---|
13 | |
---|
14 | homepage http://gnunet.org/ |
---|
15 | platforms darwin |
---|
16 | |
---|
17 | fetch.type svn |
---|
18 | svn.url https://ng.gnunet.org/svn/gnunet/ |
---|
19 | svn.revision 13253 |
---|
20 | |
---|
21 | checksums md5 8d6f434b6c5646794c56b5b053d05b99 \ |
---|
22 | sha1 e39371a6e34a6a8b5d832b2b937ef74ea59ae649 \ |
---|
23 | rmd160 72e2fce867d06a73b78dad12011c6a6979da7633 |
---|
24 | |
---|
25 | |
---|
26 | depends_lib port:libextractor \ |
---|
27 | port:sqlite3 \ |
---|
28 | port:zlib \ |
---|
29 | port:libgcrypt \ |
---|
30 | port:curl \ |
---|
31 | port:libmicrohttpd \ |
---|
32 | port:libpcap \ |
---|
33 | port:libesmtp |
---|
34 | |
---|
35 | use_parallel_build no |
---|
36 | |
---|
37 | set conffile "${prefix}/etc/gnunet.conf" |
---|
38 | set servicehome "${prefix}/var/lib/gnunet" |
---|
39 | set logdir "${prefix}/var/log/gnunet" |
---|
40 | set user gnunet |
---|
41 | set grp gnunet |
---|
42 | |
---|
43 | |
---|
44 | startupitem.create no |
---|
45 | startupitem.logfile ${logdir}/GNUnet.log |
---|
46 | |
---|
47 | startupitem.start \ |
---|
48 | "sudo -u ${user} -c \"${prefix}/bin/gnunet-arm -c ${conffile} -s\"" |
---|
49 | |
---|
50 | startupitem.stop \ |
---|
51 | "sudo -u ${user} -c \"${prefix}/bin/gnunet-arm -c ${conffile} -e\"" |
---|
52 | |
---|
53 | |
---|
54 | pre-configure { |
---|
55 | system "cd ${worksrcpath}; ./bootstrap" |
---|
56 | } |
---|
57 | |
---|
58 | post-destroot { |
---|
59 | addgroup ${grp} |
---|
60 | set gid [existsgroup ${grp}] |
---|
61 | adduser ${user} shell=/bin/false gid=${gid} \ |
---|
62 | home=${servicehome} \ |
---|
63 | realname="GNUnet daemon" |
---|
64 | |
---|
65 | xinstall -m 644 ${worksrcpath}/contrib/defaults.conf ${destroot}${conffile} |
---|
66 | xinstall -d -o ${user} -g ${grp} -m 755 ${destroot}${servicehome} ${destroot}${logdir} |
---|
67 | |
---|
68 | destroot.keepdirs ${destroot}${logdir} \ |
---|
69 | ${destroot}${servicehome} |
---|
70 | |
---|
71 | reinplace "s|SERVICEHOME = ~/.gnunet/|SERVICEHOME = ${servicehome}/|g" ${destroot}${conffile} |
---|
72 | reinplace "s|# GLOBAL_POSTFIX.*|GLOBAL_POSTFIX = -l ${logdir}/{}.log|" ${destroot}${conffile} |
---|
73 | #system "chown -R ${user}:${grp} ${destroot}${servicehome}" |
---|
74 | } |
---|
75 | |
---|
76 | post-install { |
---|
77 | ui_msg "\nTo start GNUnet daemons : |
---|
78 | sudo -u ${user} -c \"${prefix}/bin/gnunet-arm -c ${conffile} -s\" " |
---|
79 | |
---|
80 | ui_msg "\nTo stop GNUnet daemons : |
---|
81 | sudo -u ${user} -c \"${prefix}/bin/gnunet-arm -c ${conffile} -e\" " |
---|
82 | } |
---|
83 | |
---|