1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name percona-server-devel |
---|
6 | version 5.5.17-rel22.1 |
---|
7 | revision 1 |
---|
8 | set branch [regsub rel $version ""] |
---|
9 | homepage http://www.percona.com/ |
---|
10 | categories databases |
---|
11 | platforms darwin |
---|
12 | maintainers quest |
---|
13 | license GPL-2 |
---|
14 | distfiles |
---|
15 | |
---|
16 | description \ |
---|
17 | Multithreaded SQL database server |
---|
18 | |
---|
19 | long_description \ |
---|
20 | Percona is an open-source, multi-threaded SQL database \ |
---|
21 | with a command syntax very similar to mSQL. |
---|
22 | |
---|
23 | depends_run \ |
---|
24 | port:percona-devel |
---|
25 | |
---|
26 | set major_version [strsed ${version} {s/\..*$//}] |
---|
27 | set mysql mysql${major_version} |
---|
28 | set libdir ${prefix}/lib/${mysql} |
---|
29 | set bindir ${libdir}/bin |
---|
30 | set dbdir ${prefix}/var/db/${mysql} |
---|
31 | set sysconfdir ${prefix}/etc/${mysql} |
---|
32 | |
---|
33 | if {"darwin" == ${os.platform} && ${os.major} > 8} { |
---|
34 | set mysqluser _mysql |
---|
35 | } else { |
---|
36 | set mysqluser mysql |
---|
37 | } |
---|
38 | |
---|
39 | startupitem.create yes |
---|
40 | startupitem.name ${mysql} |
---|
41 | startupitem.start "${prefix}/share/${mysql}/mysql/mysql.server start" |
---|
42 | startupitem.stop "${prefix}/share/${mysql}/mysql/mysql.server stop" |
---|
43 | |
---|
44 | use_configure no |
---|
45 | supported_archs noarch |
---|
46 | |
---|
47 | build {} |
---|
48 | |
---|
49 | destroot { |
---|
50 | addgroup ${mysqluser} |
---|
51 | set gid [existsgroup ${mysqluser}] |
---|
52 | adduser ${mysqluser} gid=${gid} realname=MySQL\ Server |
---|
53 | |
---|
54 | xinstall -m 755 -o root -d ${destroot}${prefix}/var/run |
---|
55 | |
---|
56 | xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \ |
---|
57 | ${destroot}${dbdir} \ |
---|
58 | ${destroot}${prefix}/var/log/${mysql} \ |
---|
59 | ${destroot}${prefix}/var/run/${mysql} |
---|
60 | destroot.keepdirs-append \ |
---|
61 | ${destroot}${dbdir} \ |
---|
62 | ${destroot}${prefix}/var/log/${mysql} \ |
---|
63 | ${destroot}${prefix}/var/run/${mysql} |
---|
64 | } |
---|
65 | |
---|
66 | post-install { |
---|
67 | ui_msg "******************************************************" |
---|
68 | ui_msg "* In order to setup the database, you might want to run" |
---|
69 | ui_msg "* sudo -u ${mysqluser} mysql_install_db5" |
---|
70 | ui_msg "* if this is a new install" |
---|
71 | ui_msg "******************************************************" |
---|
72 | } |
---|