Ticket #19040: Portfile.2

File Portfile.2, 3.0 KB (added by n0ts (Naoya Nakazawa), 16 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
11use_parallel_build      yes
12
13description \
14    Makuosan(MAKUO for short) is a software which transfer files to multiple servers simultaneously using UDP multicast.
15
16long_description \
17    Makuosan(MAKUO for short) is a software which transfer files to multiple servers simultaneously using UDP multicast. \
18(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\; \
19 Scalability: \
20The 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. \
21 Simultaneous update on every server. \
22The makuosan transfers files simultaneously using IP multicast. Therefore, there should not be any out of sync server. \
23 Simple configuration: \
24Each makuosan daemon maintains available server list by periodically checking existence of other makuosan daemons on different servers. \
25The makuosan transfers files only to those servers where makuosan daemon is also alive. Therefore, it never stalls waiting for a dead server, or timeouts.
26
27master_sites \
28    http://downloads.sourceforge.net/makuosan/makuosan-${version}.tar.gz
29
30checksums \
31    md5     bc3eac8db45c804d6c15b4f4bfbf331e \
32    sha1    cf639d13554956fd4e5255e93a1713b7a45d8a5f \
33    rmd160  ddaef4c83451630763ca13a8f0d9d67a6870bc2d
34
35depends_lib \
36    port:openssl
37
38
39variant server description {add a startup item} {
40    set pidfile       ${prefix}/var/run/${name}.pid
41    set makuosan_sbin ${prefix}/sbin/${name}
42
43    # Create a startupitem to start/stop the server
44    startupitem.create  yes
45    startupitem.init    "PIDFILE=${pidfile}"
46    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}"
47    startupitem.stop    "\[ -r \${PIDFILE} \] && /bin/kill \$(cat \${PIDFILE}) && /bin/rm -f \${PIDFILE}"
48}
49
50pre-destroot {
51    xinstall -m 755 ${filespath}/makuosanrc.in ${destroot}${prefix}/etc/makuosanrc.sample
52}
53
54post-install {
55    if { [variant_isset server] } {
56        ui_msg "******************************************************"
57        ui_msg "*"
58        ui_msg "* First, copy makusaon's base directory setting."
59        ui_msg "* \$ sudo cp ${prefix}/etc/makuosanrc.smaple ${prefix}/etc/"
60        ui_msg "*"
61        ui_msg "******************************************************"
62    }
63}