Ticket #52144: patch_port_mariadb-server_startupitem_2016Aug31.diff
File patch_port_mariadb-server_startupitem_2016Aug31.diff, 3.2 KB (added by ctreleaven (Craig Treleaven), 8 years ago) |
---|
-
Portfile
$ svn diff
9 9 set version_branch [join [lrange [split ${version} .] 0 1] .] 10 10 # Please set revision_client and revision_server to 0 if you bump version. 11 11 set revision_client 0 12 set revision_server 012 set revision_server 1 13 13 categories databases 14 14 platforms darwin 15 15 license GPL-2 … … 206 206 207 207 supported_archs noarch 208 208 distfiles 209 set plistlabel org.macports.mariadb-server 210 set plistfile ${plistlabel}.plist 211 set plistdir ${prefix}/etc/LaunchDaemons/${plistlabel} 209 212 210 213 depends_run port:${name_mysql} 211 214 215 pre-patch { 216 file mkdir ${worksrcpath}/macports 217 copy ${filespath}/${plistfile} ${worksrcpath}/macports/ 218 } 219 220 post-patch { 221 reinplace "s|@NAME@|${name_mysql}|g" \ 222 ${worksrcpath}/macports/${plistfile} 223 reinplace "s|@PREFIX@|${prefix}|g" \ 224 ${worksrcpath}/macports/${plistfile} 225 } 226 212 227 if {"darwin" eq ${os.platform} && ${os.major} > 8} { 213 228 set mysqluser _mysql 214 229 } else { … … 216 231 } 217 232 add_users ${mysqluser} group=${mysqluser} realname=MySQL\ Server 218 233 219 startupitem.create yes220 startupitem.executable ${prefix}/lib/${name_mysql}/bin/mysqld --user=${mysqluser}221 222 234 use_configure no 223 235 224 236 build {} … … 235 247 ${destroot}${prefix}/var/db/${name_mysql} \ 236 248 ${destroot}${prefix}/var/log/${name_mysql} \ 237 249 ${destroot}${prefix}/var/run/${name_mysql} 250 xinstall -d -m 0755 ${destroot}${plistdir} 251 xinstall ${worksrcpath}/macports/${plistfile} ${destroot}${plistdir} 252 } 253 254 post-activate { 255 ln -s ${plistdir}/${plistfile} /Library/LaunchDaemons 238 256 } 239 257 240 258 notes " -
files/org.macports.mariadb-server.plist
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 <plist version="1.0"> 4 <dict> 5 <key>Label</key> <string>org.macports.@NAME@-server</string> 6 <key>ProcessType</key> <string>Interactive</string> 7 <key>Disabled</key> <false/> 8 <key>RunAtLoad</key> <true/> 9 <key>KeepAlive</key> <true/> 10 <key>SessionCreate</key> <true/> 11 <key>LaunchOnlyOnce</key> <false/> 12 <key>UserName</key> <string>_mysql</string> 13 <key>GroupName</key> <string>_mysql</string> 14 <key>ExitTimeOut</key> <integer>600</integer> 15 <key>ProgramArguments</key> 16 <array> 17 <string>@PREFIX@/lib/@NAME@/bin/mysqld</string> 18 <string>--datadir=@PREFIX@/var/db/@NAME@</string> 19 <string>--plugin-dir=@PREFIX@/lib/@NAME@/plugin</string> 20 <string>--log-error=@PREFIX@/var/log/@NAME@/mysqld.local.err</string> 21 <string>--pid-file=@PREFIX@/var/run/@NAME@/mysqld.local.pid</string> 22 </array> 23 </dict> 24 </plist>