source: trunk/dports/databases/mysql3/Portfile @ 30223

Last change on this file since 30223 was 30223, checked in by jmpp@…, 12 years ago

nomaintainer address abstraction in databases category.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: Portfile 30223 2007-10-22 22:46:02Z jmpp@macports.org $
2
3PortSystem 1.0
4name                    mysql3
5version                 3.23.58
6categories              databases
7maintainers             nomaintainer
8description             Multithreaded SQL database server
9homepage                http://www.mysql.com/
10platforms               darwin
11
12long_description        MySQL is an open-source, multi-threaded SQL database \
13                        with a command syntax very similar to mSQL.
14
15master_sites    http://mysql.mirrors.pair.com/Downloads/MySQL-3.23/ \
16                                http://mysql.he.net/Downloads/MySQL-3.23/ \
17                                http://mirrors.sunsite.dk/mysql/Downloads/MySQL-3.23/ \
18                                http://ftp.plusline.de/mysql/Downloads/MySQL-3.23/ \
19                                freebsd
20
21distname                mysql-${version}
22checksums               md5 835a96c86132fbde0db36db60c5b34cd
23patchfiles              patch-libmysql-violite.c patch-sql-violite.c
24
25depends_lib             port:ncurses port:zlib
26
27set dbdir               ${prefix}/var/db/mysql
28
29configure.ldflags-append        "-lncurses"
30
31configure.args          --includedir=${prefix}/include/${name} \
32                        --libdir=${prefix}/lib/${name} \
33                        --bindir=${prefix}/lib/${name}/bin \
34                        --localstatedir=${dbdir} --without-server \
35                        --sysconfdir=${prefix}/etc/${name} --without-bench \
36                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info
37
38set binaries    "mysql mysql_access"
39post-destroot {
40        system "cd ${destroot}${prefix} && rm -rf mysql-test share/info"
41        system "cd ${destroot}${prefix}/share && mv mysql ${name}"
42        foreach b ${binaries} {
43                system "cd ${destroot}${prefix}/bin && ln -s ../lib/${name}/bin/${b} ${b}3"
44        }
45}
46
47variant innodb  { configure.args-append --with-innodb }
48
49variant server  {
50        configure.args-delete   --without-server
51
52        startupitem.create      yes
53        startupitem.start       "${prefix}/share/mysql/mysql.server start"
54        startupitem.stop        "${prefix}/share/mysql/mysql.server stop"
55
56        pre-destroot {
57                addgroup mysql
58                set gid [existsgroup mysql]
59                adduser mysql gid=${gid} realname=MySQL\ Server
60
61                xinstall -o mysql -g mysql -m 755 -d ${dbdir}
62        }
63
64        post-destroot {
65                xinstall -m 644 ${worksrcpath}/support-files/my-medium.cnf \
66                        ${destroot}${prefix}/etc/${name}/my.cnf
67        }
68
69        post-install {
70        ui_msg "=================================================================\n"
71        ui_msg "If this is a new installation of MySQL, you must run\n${prefix}/bin/mysql_install_db after installing this port!\n"
72        ui_msg "You must also run:\n\n  'chown -R mysql:mysql ${dbdir}'\n\nbefore starting the MySQL daemon.\n"
73        ui_msg "=================================================================\n"
74        }
75}
76
77platform darwin 6 { depends_lib-append lib:libdl:dlcompat }
78
79platform darwin 8 {
80        configure.compiler      gcc-4.0
81}
Note: See TracBrowser for help on using the repository browser.