Ticket #12313: mysql5-client-Portfile

File mysql5-client-Portfile, 2.7 KB (added by sfiera@…, 17 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                mysql5-client
6version             5.0.45
7homepage            http://www.mysql.com/
8categories          databases
9platforms           darwin
10maintainers         ryandesign
11distname            mysql-${version}
12
13description \
14        Multithreaded SQL database client
15
16long_description \
17        MySQL is an open-source, multi-threaded SQL database \
18        with a command syntax very similar to mSQL. This port \
19        installs client libraries and binaries for it.
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 mysql           mysql5
43set dbdir           ${prefix}/var/db/${mysql}
44set mysqluser       mysql
45
46configure.args \
47        --mandir=${prefix}/share/man \
48        --infodir=${prefix}/share/info \
49        --localstatedir=${dbdir} \
50        --libdir=${prefix}/lib/${mysql} \
51        --bindir=${prefix}/lib/${mysql}/bin \
52        --includedir=${prefix}/include/${mysql} \
53        --datadir=${prefix}/share/${mysql} \
54        --sysconfdir=${prefix}/etc/${mysql} \
55        --with-zlib-dir=${prefix} \
56        --with-openssl=${prefix} \
57        --with-extra-charsets=complex \
58        --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \
59        --with-mysqld-user=${mysqluser} \
60        --without-bench \
61        --enable-thread-safe-client
62
63platform darwin 8 {
64        configure.env \
65                CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
66}
67
68pre-destroot {
69        xinstall -m 755 -d ${destroot}${prefix}/etc/${mysql}
70        destroot.keepdirs-append ${destroot}${prefix}/etc/${mysql}
71}
72
73post-destroot {
74        delete ${destroot}${prefix}/mysql-test
75       
76        # Symlink mysql binaries into bin directory, with a 5 appended to the name
77        cd ${destroot}${prefix}/bin
78        foreach f [glob -tails -directory ${destroot}${prefix}/lib/${mysql}/bin my*] {
79                ln -sf ../lib/${mysql}/bin/${f} ${f}5
80        }
81}
82
83post-install {
84        ui_msg "******************************************************"
85        ui_msg "* This port installs only the client libraries to use"
86        ui_msg "* mysql5. If you want to run a server on this machine"
87        ui_msg "* as well, you should install mysql5-server"
88        ui_msg "******************************************************"
89}
90
91livecheck.check     regex
92livecheck.url       http://dev.mysql.com/
93livecheck.regex     "Generally Available (\[0-9\.\]+)"