source: trunk/dports/databases/mysql5/Portfile @ 28844

Last change on this file since 28844 was 28844, checked in by ryandesign@…, 12 years ago

mysql5: add support for the federated storage engine. See #12604

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 28844 2007-09-10 07:53:05Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                mysql5
6version             5.0.45
7revision            1
8homepage            http://www.mysql.com/
9categories          databases
10platforms           darwin
11maintainers         ryandesign
12distname            mysql-${version}
13
14description \
15        Multithreaded SQL database server
16
17long_description \
18        MySQL is an open-source, multi-threaded SQL database \
19        with a command syntax very similar to mSQL.
20
21master_sites \
22        http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/ \
23        http://mysql.he.net/Downloads/MySQL-5.0/ \
24        http://mysql.orst.edu/Downloads/MySQL-5.0 \
25        http://mysql.oss.eznetsols.org/Downloads/MySQL-5.0/ \
26        http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0/ \
27        http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.0/ \
28        http://ftp.plusline.de/mysql/Downloads/MySQL-5.0/
29
30checksums \
31        md5 a2a1c5a82bb22b45ab76a8ecab94e10d \
32        sha1 a5fba8e004acc43ac1a576d728f10215f54ebe20 \
33        rmd160 ee6717c65dc7bb6b5b596b90ef6c47c7fdebf5fb
34
35depends_lib \
36        port:zlib \
37        port:openssl
38
39patchfiles \
40        patch-mysys-base64.c.diff
41
42set dbdir           ${prefix}/var/db/${name}
43set mysqluser       mysql
44
45configure.args \
46        --mandir=${prefix}/share/man \
47        --infodir=${prefix}/share/info \
48        --localstatedir=${dbdir} \
49        --libdir=${prefix}/lib/${name} \
50        --bindir=${prefix}/lib/${name}/bin \
51        --includedir=${prefix}/include/${name} \
52        --datadir=${prefix}/share/${name} \
53        --sysconfdir=${prefix}/etc/${name} \
54        --with-zlib-dir=${prefix} \
55        --with-openssl=${prefix} \
56        --with-extra-charsets=complex \
57        --with-federated-storage-engine \
58        --with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \
59        --with-mysqld-user=${mysqluser} \
60        --without-bench \
61        --enable-thread-safe-client
62
63platform darwin 8 {
64        configure.compiler      gcc-4.0
65}
66
67variant server {
68        # Create a startupitem to start/stop the server
69        startupitem.create      yes
70        startupitem.start       "${prefix}/share/mysql5/mysql/mysql.server start"
71        startupitem.stop        "${prefix}/share/mysql5/mysql/mysql.server stop"
72}
73
74pre-destroot {
75        # Some directories we must have in all cases
76        xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
77        destroot.keepdirs-append ${destroot}${prefix}/etc/${name}
78       
79        # Setup only for server
80        if { [variant_isset server] } {
81                addgroup ${mysqluser}
82                set gid [existsgroup ${mysqluser}]
83                adduser ${mysqluser} gid=${gid} realname=MySQL\ Server
84               
85                # Some directories we must have only if we're running as a server
86                xinstall -m 755 -o root -d ${destroot}${prefix}/var/run
87               
88                xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
89                        ${destroot}${dbdir} \
90                        ${destroot}${prefix}/var/run/${name}
91                destroot.keepdirs-append  \
92                        ${destroot}${dbdir} \
93                        ${destroot}${prefix}/var/run/${name}
94        }
95}
96
97post-destroot {
98        delete ${destroot}${prefix}/mysql-test
99       
100        # Symlink mysql binaries into bin directory, with a 5 appended to the name
101        cd ${destroot}${prefix}/bin
102        foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] {
103                ln -sf ../lib/${name}/bin/${f} ${f}5
104        }
105}
106
107post-install {
108        if { [variant_isset server] } {
109                ui_msg "******************************************************"
110                ui_msg "* In order to setup the database, you might want to run"
111                ui_msg "* sudo -u ${mysqluser} mysql_install_db5"
112                ui_msg "* if this is a new install"
113                ui_msg "******************************************************"
114        }
115}
116
117livecheck.check     regex
118livecheck.url       http://dev.mysql.com/
119livecheck.regex     "Generally Available (\[0-9\.\]+)"
Note: See TracBrowser for help on using the repository browser.