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

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

Upgrade mysql5 --> 5.0.27

Note that 5.0.26 introduced another ABI incompatibilitity, which is rolled back in 5.0.27. For those of you who are watching it's the second time this has happened recently, as they also did this in 5.0.24

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