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

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

mysql5: whitespace/formatting changes only

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