1 | --- Portfile-old Sat Apr 26 16:19:06 2003 |
---|
2 | +++ Portfile Sat Apr 26 16:33:43 2003 |
---|
3 | @@ -1,58 +1,48 @@ |
---|
4 | # $Id: Portfile,v 1.28 2003/03/03 06:13:24 mij Exp $ |
---|
5 | |
---|
6 | PortSystem 1.0 |
---|
7 | -name mysql |
---|
8 | -version 3.23.52 |
---|
9 | -categories databases |
---|
10 | -maintainers eric@opendarwin.org |
---|
11 | -description Multithreaded SQL database server |
---|
12 | -long_description MySQL is an open-source, multi-threaded SQL database \ |
---|
13 | - with a command syntax very similar to mSQL. |
---|
14 | -homepage http://www.mysql.com/ |
---|
15 | -platforms darwin |
---|
16 | -master_sites ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-3.23/ \ |
---|
17 | - ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \ |
---|
18 | - http://distfiles.opendarwin.org/:lt |
---|
19 | - |
---|
20 | -set filename ${portname}-${portversion}${extract.sufx} |
---|
21 | -distfiles ${filename} ltconfig13:lt ltmain13:lt |
---|
22 | -extract.only ${filename} |
---|
23 | -depends_lib lib:libdl.1:dlcompat |
---|
24 | - |
---|
25 | -checksums mysql-3.23.52.tar.gz md5 \ |
---|
26 | - 88705b7f38e64b5c21ebb68c77b75e5a \ |
---|
27 | - ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \ |
---|
28 | - ltmain13 md5 e094ae92724c4015dbab97de151c2525 |
---|
29 | - |
---|
30 | -post-patch { system "cp ${distpath}/ltconfig13 ${worksrcpath}/ltconfig" |
---|
31 | - system "cp ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh" |
---|
32 | -} |
---|
33 | - |
---|
34 | -set dbdir ${prefix}/var/db/mysql |
---|
35 | - |
---|
36 | -configure.env LDFLAGS=-L${prefix}/lib\\ -lncurses \ |
---|
37 | - CPPFLAGS=-I${prefix}/include |
---|
38 | - |
---|
39 | -configure.args --localstatedir=${dbdir} \ |
---|
40 | - --without-bench |
---|
41 | - |
---|
42 | -pre-install { system "install -o root -m 755 -d ${dbdir}" } |
---|
43 | - |
---|
44 | -variant server { |
---|
45 | - depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
46 | - |
---|
47 | - post-install { |
---|
48 | - addgroup mysql |
---|
49 | - set gid [existsgroup mysql] |
---|
50 | - adduser mysql gid=${gid} realname=MySQL\ Server |
---|
51 | - |
---|
52 | - #system "${destroot}${prefix}/bin/mysql_install_db" |
---|
53 | - #system "chown -R mysql:mysql ${dbdir}" |
---|
54 | - |
---|
55 | - system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d" |
---|
56 | - set script [open ${destroot}${prefix}/etc/rc.d/mysql.sh w 0755] |
---|
57 | - puts $script "#!/bin/sh" |
---|
58 | - puts $script "${prefix}/bin/safe_mysqld --user=mysql &" |
---|
59 | - close $script |
---|
60 | - } |
---|
61 | +name mysql |
---|
62 | +version 4.0.12 |
---|
63 | +categories databases |
---|
64 | +maintainers eric@opendarwin.org |
---|
65 | +description Multithreaded SQL database server |
---|
66 | +long_description MySQL is an open-source, multi-threaded SQL database \ |
---|
67 | + with a command syntax very similar to mSQL. |
---|
68 | +homepage http://www.mysql.com/ |
---|
69 | +platforms darwin |
---|
70 | +master_sites ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-4.0/ \ |
---|
71 | + http://mysql-mirror.free.fr/Downloads/MySQL-4.0/ \ |
---|
72 | + ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \ |
---|
73 | + http://distfiles.opendarwin.org/:lt |
---|
74 | + |
---|
75 | +set filename ${portname}-${portversion}${extract.sufx} |
---|
76 | +extract.only ${filename} |
---|
77 | +distfiles ${filename} |
---|
78 | +depends_lib lib:libdl.1:dlcompat |
---|
79 | +checksums md5 7d7696ecad5018939735049c0e87132f |
---|
80 | + |
---|
81 | +set dbdir ${prefix}/var/db/mysql |
---|
82 | + |
---|
83 | +configure.env LDFLAGS=-L${prefix}/lib \ |
---|
84 | + CPPFLAGS=-I${prefix}/include |
---|
85 | + |
---|
86 | +configure.args --localstatedir=${dbdir} --without-server --sysconfdir=${prefix}/etc --without-bench |
---|
87 | + |
---|
88 | +variant server { |
---|
89 | + depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
90 | + configure.args --localstatedir=${dbdir} --sysconfdir=${prefix}/etc --without-bench |
---|
91 | + pre-install { system "install -o mysql -g mysql -m 775 -d ${destroot}${dbdir}" |
---|
92 | + } |
---|
93 | + |
---|
94 | + |
---|
95 | + post-install { |
---|
96 | + |
---|
97 | + system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d" |
---|
98 | + set script [open ${destroot}${prefix}/etc/rc.d/mysql.sh w 0755] |
---|
99 | + puts $script "#!/bin/sh" |
---|
100 | + puts $script "${prefix}/bin/mysqld_safe --user=mysql &" |
---|
101 | + close $script |
---|
102 | + system "cd ${workpath}/${worksrcdir} && \ |
---|
103 | + cp support-files/my-medium.cnf ${destroot}${prefix}/etc/my.cnf" |
---|
104 | + } |
---|
105 | } |
---|