1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name mysql5-server |
---|
6 | version 5.0.45 |
---|
7 | homepage http://www.mysql.com/ |
---|
8 | categories databases |
---|
9 | platforms darwin |
---|
10 | maintainers ryandesign |
---|
11 | distfiles |
---|
12 | |
---|
13 | description \ |
---|
14 | Multithreaded SQL database server |
---|
15 | |
---|
16 | long_description \ |
---|
17 | MySQL is an open-source, multi-threaded SQL database \ |
---|
18 | with a command syntax very similar to mSQL. This port \ |
---|
19 | installs a server for it. |
---|
20 | |
---|
21 | depends_build port:mysql5-client |
---|
22 | |
---|
23 | set mysql mysql5 |
---|
24 | set dbdir ${prefix}/var/db/${mysql} |
---|
25 | set mysqluser mysql |
---|
26 | |
---|
27 | use_configure no |
---|
28 | build {} |
---|
29 | |
---|
30 | # Create a startupitem to start/stop the server |
---|
31 | startupitem.create yes |
---|
32 | startupitem.start "${prefix}/share/mysql5/mysql/mysql.server start" |
---|
33 | startupitem.stop "${prefix}/share/mysql5/mysql/mysql.server stop" |
---|
34 | |
---|
35 | destroot { |
---|
36 | addgroup ${mysqluser} |
---|
37 | set gid [existsgroup ${mysqluser}] |
---|
38 | adduser ${mysqluser} gid=${gid} realname=MySQL\ Server |
---|
39 | |
---|
40 | # Some directories we must have only if we're running as a server |
---|
41 | xinstall -m 755 -o root -d ${destroot}${prefix}/var/run |
---|
42 | |
---|
43 | xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \ |
---|
44 | ${destroot}${dbdir} \ |
---|
45 | ${destroot}${prefix}/var/run/${mysql} |
---|
46 | destroot.keepdirs-append \ |
---|
47 | ${destroot}${dbdir} \ |
---|
48 | ${destroot}${prefix}/var/run/${mysql} |
---|
49 | } |
---|
50 | |
---|
51 | post-install { |
---|
52 | ui_msg "******************************************************" |
---|
53 | ui_msg "* In order to setup the database, you might want to run" |
---|
54 | ui_msg "* sudo -u ${mysqluser} mysql_install_db5" |
---|
55 | ui_msg "* if this is a new install" |
---|
56 | ui_msg "******************************************************" |
---|
57 | } |
---|