Ticket #19040: Portfile

File Portfile, 3.2 KB (added by n0ts (Naoya Nakazawa), 15 years ago)
Line 
1# $Id: #
2
3PortSystem              1.0
4
5name                    makuosan
6version                 1.1.3
7homepage                http://lab.klab.org/wiki/Makuosan
8categories              net
9platforms               darwin
10maintainers             naoya.n@gmail.com
11distname                makuosan-${version}
12use_parallel_build      yes
13
14description \
15    Makuosan(MAKUO for short) is a software which transfer files to multiple servers simultaneously using UDP multicast.
16
17long_description \
18    Makuosan(MAKUO for short) is a software which transfer files to multiple servers simultaneously using UDP multicast. \
19(MAKUO consists of makuosan daemon and command line utility msync. The makuosan should be run on every server in a cluster. The makuo talk to makuosan daemon.) MAKUO has following features\; \
20 Scalability: \
21The time required to transfer files to multiple servers does not depend on the number of the target servers. It takes almost as same amount of time to transfer files to 20 servers as it does to 10 servers. However, it is desirable to use MAKUO among servers with similar performance, because transfer speed is limited by the slowest server. \
22 Simultaneous update on every server. \
23The makuosan transfers files simultaneously using IP multicast. Therefore, there should not be any out of sync server. \
24 Simple configuration: \
25Each makuosan daemon maintains available server list by periodically checking existence of other makuosan daemons on different servers. \
26The makuosan transfers files only to those servers where makuosan daemon is also alive. Therefore, it never stalls waiting for a dead server, or timeouts.
27
28master_sites \
29    http://downloads.sourceforge.net/makuosan/makuosan-${version}.tar.gz
30
31checksums \
32    ${distname}${extract.suffix} \
33        md5     bc3eac8db45c804d6c15b4f4bfbf331e \
34        sha1    cf639d13554956fd4e5255e93a1713b7a45d8a5f \
35        rmd160  ddaef4c83451630763ca13a8f0d9d67a6870bc2d
36
37depends_lib \
38    port:openssl
39
40configure.args \
41    --prefix=${prefix}
42
43platform darwin 6 {
44    pre-fetch {
45        return -code error "no support for systems prior to 10.3"
46    }
47}
48
49
50variant server description {add a startup item} {
51    set pidfile       ${prefix}/var/run/${name}.pid
52    set makuosan_sbin ${prefix}/sbin/${name}
53
54    # Create a startupitem to start/stop the server
55    startupitem.create  yes
56    startupitem.init    "PIDFILE=${pidfile}"
57    startupitem.start   "\[ -f ${prefix}/etc/makuosanrc \] && . ${prefix}/etc/makuosanrc && ${makuosan_sbin} -b \${BASE_DIR} -p \${PORT} -l \${IP_ADDRESS} && /bin/ps -ax | /usr/bin/grep ${makuosan_sbin} | /usr/bin/grep -v grep | /usr/bin/awk '{ print \$1 }' > \${PIDFILE}"
58    startupitem.stop    "\[ -r \${PIDFILE} \] && /bin/kill \$(cat \${PIDFILE}) && /bin/rm -f \${PIDFILE}"
59}
60
61pre-destroot {
62    xinstall -m 755 ${filespath}/makuosanrc.in ${destroot}${prefix}/etc/makuosanrc
63}
64
65post-destroot {
66}
67
68post-install {
69    if { [variant_isset server] } {
70        ui_msg "******************************************************"
71        ui_msg "*"
72        ui_msg "* First, Edit makusaon's base directory setting."
73        ui_msg "* The configuration file is ${prefix}/etc/makuosanrc"
74        ui_msg "*"
75        ui_msg "******************************************************"
76    }
77}
78