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 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name mariadb52-server |
---|
7 | version 5.2.5 |
---|
8 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
9 | homepage http://mariadb.org/ |
---|
10 | categories databases |
---|
11 | platforms darwin |
---|
12 | maintainers jogwtr@googlemail.com |
---|
13 | license GPL-2 |
---|
14 | distfiles |
---|
15 | |
---|
16 | description \ |
---|
17 | A database server that offers drop-in replacement functionality for MySQL |
---|
18 | |
---|
19 | long_description \ |
---|
20 | MariaDB is a database server that offers drop-in replacement functionality for \ |
---|
21 | MySQL1. MariaDB is built by some of the original authors of MySQL, with \ |
---|
22 | assistance from the broader community of Free and open source software \ |
---|
23 | developers. In addition to the core functionality of MySQL, MariaDB offers a \ |
---|
24 | rich set of feature enhancements including alternate storage engines, server \ |
---|
25 | optimizations, and patches. |
---|
26 | |
---|
27 | depends_run \ |
---|
28 | port:mariadb52 |
---|
29 | |
---|
30 | set major_version [strsed ${version} {s/\..*$//}] |
---|
31 | set mariadb mysql5 |
---|
32 | set libdir ${prefix}/lib/${mariadb} |
---|
33 | set bindir ${libdir}/bin |
---|
34 | set dbdir ${prefix}/var/db/${mariadb} |
---|
35 | set sysconfdir ${prefix}/etc/${mariadb} |
---|
36 | |
---|
37 | if {"darwin" == ${os.platform} && ${os.major} > 8} { |
---|
38 | set mariadbuser _mysql |
---|
39 | } else { |
---|
40 | set mariadbuser mysql |
---|
41 | } |
---|
42 | |
---|
43 | startupitem.create yes |
---|
44 | startupitem.name ${mariadb} |
---|
45 | startupitem.start "${prefix}/share/${mariadb}/mysql/mysql.server start" |
---|
46 | startupitem.stop "${prefix}/share/${mariadb}/mysql/mysql.server stop" |
---|
47 | |
---|
48 | use_configure no |
---|
49 | supported_archs noarch |
---|
50 | |
---|
51 | build {} |
---|
52 | |
---|
53 | destroot { |
---|
54 | addgroup ${mariadbuser} |
---|
55 | set gid [existsgroup ${mariadbuser}] |
---|
56 | adduser ${mariadbuser} gid=${gid} realname=MariaDB\ Server |
---|
57 | |
---|
58 | xinstall -m 755 -o root -d ${destroot}${prefix}/var/run |
---|
59 | |
---|
60 | xinstall -m 755 -o ${mariadbuser} -g ${mariadbuser} -d \ |
---|
61 | ${destroot}${dbdir} \ |
---|
62 | ${destroot}${prefix}/var/log/${mariadb} \ |
---|
63 | ${destroot}${prefix}/var/run/${mariadb} |
---|
64 | destroot.keepdirs-append \ |
---|
65 | ${destroot}${dbdir} \ |
---|
66 | ${destroot}${prefix}/var/log/${mariadb} \ |
---|
67 | ${destroot}${prefix}/var/run/${mariadb} |
---|
68 | } |
---|
69 | |
---|
70 | post-install { |
---|
71 | ui_msg "******************************************************" |
---|
72 | ui_msg "* In order to setup the database, you might want to run" |
---|
73 | ui_msg "* sudo -u ${mariadbuser} mysql_install_db5" |
---|
74 | ui_msg "* if this is a new install" |
---|
75 | ui_msg "******************************************************" |
---|
76 | } |
---|