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