source: trunk/dports/databases/mysql5-devel/Portfile @ 26810

Last change on this file since 26810 was 26810, checked in by jwa@…, 10 years ago

version bump to 5.1.20, add rmd160 checksum

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