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

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

mysql5: add rmd160 checksum

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 26749 2007-07-05 21:51:08Z 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        rmd160 57f2b5ac628814abd2b19a263cd2c90e3e20593d
33
34depends_lib \
35        port:zlib \
36        port:openssl
37
38patchfiles \
39        patch-mysys-base64.c
40
41set dbdir           ${prefix}/var/db/${name}
42set mysqluser       mysql
43
44configure.args \
45        --mandir=${prefix}/share/man \
46        --infodir=${prefix}/share/info \
47        --localstatedir=${dbdir} \
48        --libdir=${prefix}/lib/${name} \
49        --bindir=${prefix}/lib/${name}/bin \
50        --includedir=${prefix}/include/${name} \
51        --datadir=${prefix}/share/${name} \
52        --sysconfdir=${prefix}/etc/${name} \
53        --with-zlib-dir=${prefix} \
54        --with-openssl=${prefix} \
55        --with-extra-charsets=complex \
56        --with-unix-socket-path=${prefix}/var/run/${name}/mysqld.sock \
57        --with-mysqld-user=${mysqluser} \
58        --without-bench \
59        --enable-thread-safe-client
60
61platform darwin 8 {
62        configure.env \
63                CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
64}
65
66variant server {
67        # Create a startupitem to start/stop the server
68        startupitem.create      yes
69        startupitem.start       "${prefix}/share/mysql5/mysql/mysql.server start"
70        startupitem.stop        "${prefix}/share/mysql5/mysql/mysql.server stop"
71}
72
73pre-destroot {
74        # Some directories we must have in all cases
75        xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
76        destroot.keepdirs-append ${destroot}${prefix}/etc/${name}
77       
78        # Setup only for server
79        if { [variant_isset server] } {
80                addgroup ${mysqluser}
81                set gid [existsgroup ${mysqluser}]
82                adduser ${mysqluser} gid=${gid} realname=MySQL\ Server
83               
84                # Some directories we must have only if we're running as a server
85                xinstall -m 755 -o root -d ${destroot}${prefix}/var/run
86               
87                xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
88                        ${destroot}${dbdir} \
89                        ${destroot}${prefix}/var/run/${name}
90                destroot.keepdirs-append  \
91                        ${destroot}${dbdir} \
92                        ${destroot}${prefix}/var/run/${name}
93        }
94}
95
96post-destroot {
97        delete ${destroot}${prefix}/mysql-test
98       
99        # Symlink mysql binaries into bin directory, with a 5 appended to the name
100        cd ${destroot}${prefix}/bin
101        foreach f [glob -tails -directory ${destroot}${prefix}/lib/${name}/bin my*] {
102                ln -sf ../lib/${name}/bin/${f} ${f}5
103        }
104}
105
106post-install {
107        if { [variant_isset server] } {
108                ui_msg "******************************************************"
109                ui_msg "* In order to setup the database, you might want to run"
110                ui_msg "* sudo -u ${mysqluser} mysql_install_db5"
111                ui_msg "* if this is a new install"
112                ui_msg "******************************************************"
113        }
114}
115
116livecheck.check     regex
117livecheck.url       http://dev.mysql.com/
118livecheck.regex     "Generally Available (\[0-9\.\]+)"
Note: See TracBrowser for help on using the repository browser.