[153727] trunk/dports/databases/mysql51

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


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

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

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

Modified: trunk/dports/databases/mysql51/Portfile
===================================================================
--- trunk/dports/databases/mysql51/Portfile	2016-10-09 16:54:41 UTC (rev 153726)
+++ trunk/dports/databases/mysql51/Portfile	2016-10-09 16:55:07 UTC (rev 153727)
@@ -8,7 +8,7 @@
 version             5.1.73
 # Set revision_client and revision_server to 0 if you bump version.
 set revision_client 3
-set revision_server 0
+set revision_server 1
 set version_branch  [join [lrange [split ${version} .] 0 1] .]
 categories          databases
 platforms           darwin
@@ -27,7 +27,7 @@
     # http://bugs.mysql.com/bug.php?id=47360
     PortGroup           muniversal 1.0
     PortGroup           select 1.0
-    
+
     revision            ${revision_client}
     license             GPL-2
     description         Multithreaded SQL database server
@@ -37,7 +37,7 @@
 
     distname            mysql-${version}
     use_parallel_build  yes
-    
+
     patch.pre_args      -p1
     patchfiles          patch-Makefile.in.diff \
                         patch-scripts-mysql_secure_installation.sh.diff
@@ -50,7 +50,7 @@
     
     select.group        mysql
     select.file         ${filespath}/${name_mysql}
-    
+
     post-extract {
         file mkdir ${worksrcpath}/build_macports/macports
         copy ${filespath}/macports-default.cnf \
@@ -116,7 +116,7 @@
                 ${dir}/scripts/mysqlbug
         }
     }
-    
+
     post-destroot {
         # proc portdestroot::destroot_finish fails to find and compress our man pages
         # so borrow the compress command and run on our files now.
@@ -141,7 +141,7 @@
         copy ${worksrcpath}/build_macports/macports/my.cnf \
             ${destroot}${prefix}/share/${name_mysql}/support-files/macports/
     }
-    
+
     post-install {
         if {![file exists ${prefix}/etc/LaunchDaemons/org.macports.${name_mysql}/org.macports.${name_mysql}-server.plist]} {
             ui_msg "The ${name_mysql} client has been installed."
@@ -215,22 +215,47 @@
     license             BSD
     description         Run ${name_mysql} as server
     long_description    ${description}
-    
+
     supported_archs     noarch
     distfiles
-    
+
     depends_run         port:${name_mysql}
     
     add_users ${mysqluser} group=${mysqluser} realname=MySQL\ Server
+
+    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
+    }
     
-    startupitem.create      yes
-    startupitem.executable  ${prefix}/lib/${name_mysql}/bin/mysqld --user=${mysqluser}
-    
     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 \
             ${destroot}${prefix}/etc/${name_mysql} \
             ${destroot}${prefix}/var/db/${name_mysql} \
@@ -247,6 +272,6 @@
 
 \$ sudo -u ${mysqluser} ${prefix}/lib/${name_mysql}/bin/mysql_install_db
 "
-    
+
     livecheck.type          none
 }

Added: trunk/dports/databases/mysql51/files/org.macports.mysql-server.plist
===================================================================
--- trunk/dports/databases/mysql51/files/org.macports.mysql-server.plist	                        (rev 0)
+++ trunk/dports/databases/mysql51/files/org.macports.mysql-server.plist	2016-10-09 16:55:07 UTC (rev 153727)
@@ -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/23b7855c/attachment-0002.html>


More information about the macports-changes mailing list