1 | # $Id: $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name murmur |
---|
5 | version 1.1.7 |
---|
6 | categories net audio |
---|
7 | maintainers nomaintainer |
---|
8 | description server for mumble - low latency voice chat for gaming |
---|
9 | long_description \ |
---|
10 | Server component of Mumble - an open source, low-latency, high quality \ |
---|
11 | voice chat software primarily intended for use while gaming. |
---|
12 | |
---|
13 | homepage http://mumble.sourceforge.net/ |
---|
14 | platforms macosx |
---|
15 | |
---|
16 | master_sites sourceforge:mumble |
---|
17 | checksums md5 5a382d5c065bb264abfe240ca6f03ddc |
---|
18 | distname mumble-${version} |
---|
19 | |
---|
20 | livecheck.check regex |
---|
21 | livecheck.url ${homepage} |
---|
22 | livecheck.regex ">Latest version: (.*?)<" |
---|
23 | |
---|
24 | depends_lib \ |
---|
25 | port:qt4-mac \ |
---|
26 | port:openssl |
---|
27 | |
---|
28 | depends_build \ |
---|
29 | port:boost |
---|
30 | |
---|
31 | configure.cmd qmake-mac |
---|
32 | configure.pre_args CONFIG-=app_bundle CONFIG+=\" |
---|
33 | configure.post_args \" |
---|
34 | configure.args release no-universal no-client no-ice |
---|
35 | |
---|
36 | variant universal { |
---|
37 | configure.args-delete no-universal |
---|
38 | } |
---|
39 | |
---|
40 | variant ice { |
---|
41 | configure.args-delete no-ice |
---|
42 | depends_lib-append port:ice-cpp |
---|
43 | } |
---|
44 | |
---|
45 | startupitem.create yes |
---|
46 | startupitem.type launchd |
---|
47 | startupitem.name Murmur |
---|
48 | startupitem.start "${prefix}/sbin/murmurd -ini ${prefix}/etc/murmur/murmur.ini" |
---|
49 | startupitem.stop "kill -TERM `cat ${prefix}/var/run/murmur/murmur.pid`" |
---|
50 | startupitem.pidfile auto "${prefix}/var/run/murmur/murmur.pid" |
---|
51 | |
---|
52 | build { |
---|
53 | system "cd ${worksrcpath} && make" |
---|
54 | } |
---|
55 | |
---|
56 | destroot { |
---|
57 | addgroup murmur |
---|
58 | adduser murmur gid=[existsgroup murmur] realname=Murmur\ -\ Mumble\ Voice\ Chat |
---|
59 | |
---|
60 | set dp ${destroot}/${prefix} |
---|
61 | set w ${worksrcpath} |
---|
62 | |
---|
63 | set logdir ${dp}/var/log/murmur/ |
---|
64 | set dbdir ${dp}/var/lib/murmur/ |
---|
65 | set piddir ${dp}/var/run/murmur/ |
---|
66 | |
---|
67 | xinstall -m 740 -o murmur -g murmur -d \ |
---|
68 | ${logdir} \ |
---|
69 | ${dbdir} \ |
---|
70 | ${piddir} |
---|
71 | |
---|
72 | destroot.keepdirs-append \ |
---|
73 | ${logdir} \ |
---|
74 | ${dbdir} \ |
---|
75 | ${piddir} |
---|
76 | |
---|
77 | file mkdir ${dp}/etc/murmur/ |
---|
78 | file mkdir ${dp}/sbin/ |
---|
79 | file mkdir ${dp}/etc/dbus-1/system.d/ |
---|
80 | |
---|
81 | file copy ${w}/release/murmurd ${dp}/sbin/murmurd |
---|
82 | |
---|
83 | set conf ${dp}/etc/murmur/murmur.ini |
---|
84 | file copy ${w}/scripts/murmur.ini.system ${conf} |
---|
85 | system "sed -i '' -e 's,database=.*,database=${prefix}/var/lib/murmur/murmur.sqlite,' ${conf}" |
---|
86 | system "sed -i '' -e 's,pidfile=.*,pidfile=${prefix}/var/run/murmur/murmur.pid,' ${conf}" |
---|
87 | system "sed -i '' -e 's,logfile=.*','logfile=${prefix}/var/log/murmur/murmur.log,' ${conf}" |
---|
88 | |
---|
89 | if {![variant_isset ice]} { |
---|
90 | # This change is made only to avoid confusion. Murmur ignores |
---|
91 | # the ice= config option when built without Ice support. |
---|
92 | system "sed -i -e 's,ice=,\#ice=,' ${destroot}/${prefix}/etc/murmur/murmur.ini" |
---|
93 | } |
---|
94 | |
---|
95 | set dbusservice ${dp}/etc/dbus-1/system.d/murmur.conf |
---|
96 | file copy ${w}/scripts/murmur.conf ${dbusservice} |
---|
97 | system "sed -i '' -e 's,user=.*\",user=\"murmur\",' ${dbusservice}" |
---|
98 | } |
---|
99 | |
---|
100 | pre-install { |
---|
101 | set plist ${destroot}/${prefix}/etc/LaunchDaemons/org.macports.Murmur/org.macports.Murmur.plist |
---|
102 | system "sed -i '' -e 's,</dict>,<key>UserName</key><string>murmur</string></dict>,' ${plist}" |
---|
103 | } |
---|
104 | |
---|
105 | post-install { |
---|
106 | ui_msg "" |
---|
107 | ui_msg "***************************************************************" |
---|
108 | ui_msg "* To set up a password for the SuperUser user on your Murmur" |
---|
109 | ui_msg "* server, execute:" |
---|
110 | ui_msg "*" |
---|
111 | ui_msg "* ${prefix}/sbin/murmurd -ini ${prefix}/etc/murmur/murmur.ini -supw \[password\]" |
---|
112 | ui_msg "*" |
---|
113 | ui_msg "* In case you want to interface with a different database than" |
---|
114 | ui_msg "* sqlite, then take a look at the +psql and +mysql5 variants of" |
---|
115 | ui_msg "* qt4-mac." |
---|
116 | ui_msg "*" |
---|
117 | ui_msg "***************************************************************" |
---|
118 | ui_msg "" |
---|
119 | } |
---|