[153728] trunk/dports/databases/mysql55

pixilla at macports.org pixilla at macports.org
Sun Oct 9 18:55:40 CEST 2016


Revision: 153728
          https://trac.macports.org/changeset/153728
Author:   pixilla at macports.org
Date:     2016-10-09 09:55:40 -0700 (Sun, 09 Oct 2016)
Log Message:
-----------
databases/mysql55: replace launchd plist removing daemondo dependency.

Modified Paths:
--------------
    trunk/dports/databases/mysql55/Portfile

Added Paths:
-----------
    trunk/dports/databases/mysql55/files/org.macports.mysql-server.plist

Modified: trunk/dports/databases/mysql55/Portfile
===================================================================
--- trunk/dports/databases/mysql55/Portfile	2016-10-09 16:55:07 UTC (rev 153727)
+++ trunk/dports/databases/mysql55/Portfile	2016-10-09 16:55:40 UTC (rev 153728)
@@ -8,7 +8,7 @@
 version             5.5.52
 # Set revision_client and revision_server to 0 if you bump version.
 set revision_client 0
-set revision_server 0
+set revision_server 1
 set version_branch  [join [lrange [split ${version} .] 0 1] .]
 categories          databases
 platforms           darwin
@@ -203,14 +203,37 @@
     }
     add_users ${mysqluser} group=${mysqluser} realname=MySQL\ Server
 
-    startupitem.create      yes
-    startupitem.executable  ${prefix}/lib/${name_mysql}/bin/mysqld --user=${mysqluser}
+    pre-extract {
+        copy ${filespath}/org.macports.mysql-server.plist ${workpath}/org.macports.${subport}.plist
+    }
 
+    post-patch {
+        reinplace "s|@NAME@|${subport}|g" \
+            ${workpath}/org.macports.${subport}.plist
+        reinplace "s|@NAMEMYSQL@|${name_mysql}|g" \
+            ${workpath}/org.macports.${subport}.plist
+        reinplace "s|@PREFIX@|${prefix}|g" \
+            ${workpath}/org.macports.${subport}.plist
+        reinplace "s|@SUBPORT@|${subport}|g" \
+            ${workpath}/org.macports.${subport}.plist
+        reinplace "s|@USER@|${mysqluser}|g" \
+            ${workpath}/org.macports.${subport}.plist
+        reinplace "s|@GROUP@|${mysqluser}|g" \
+            ${workpath}/org.macports.${subport}.plist
+    }
+    
     use_configure       no
 
     build {}
 
     destroot {
+        xinstall -d -m 755 ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${subport}
+        xinstall -m 0644 -o root -W ${workpath} \
+            org.macports.${subport}.plist \
+            ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${subport}
+        xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
+        ln -s ${prefix}/etc/LaunchDaemons/org.macports.${subport}/org.macports.${subport}.plist \
+            ${destroot}/Library/LaunchDaemons/org.macports.${subport}.plist
         xinstall -m 755 -o root -d \
             ${destroot}${prefix}/var/run
         xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \

Added: trunk/dports/databases/mysql55/files/org.macports.mysql-server.plist
===================================================================
--- trunk/dports/databases/mysql55/files/org.macports.mysql-server.plist	                        (rev 0)
+++ trunk/dports/databases/mysql55/files/org.macports.mysql-server.plist	2016-10-09 16:55:40 UTC (rev 153728)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>Label</key>
+    <string>org.macports. at SUBPORT@</string>
+    <key>ProcessType</key>
+    <string>Interactive</string>
+    <key>Disabled</key>
+    <false/>
+    <key>RunAtLoad</key>
+    <true/>
+    <key>KeepAlive</key>
+    <true/>
+    <key>SessionCreate</key>
+    <true/>
+    <key>LaunchOnlyOnce</key>
+    <false/>
+    <key>UserName</key>
+    <string>@USER@</string>
+    <key>GroupName</key>
+    <string>@GROUP@</string>
+    <key>ExitTimeOut</key>
+    <integer>600</integer>
+    <key>ProgramArguments</key>
+        <array>
+            <string>@PREFIX@/lib/@NAMEMYSQL@/bin/mysqld</string>
+        </array>
+</dict>
+</plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161009/bfdf0b6e/attachment-0002.html>


More information about the macports-changes mailing list