1 |
< |
### RPM external mysql 5.0.18-CMS3 |
1 |
> |
### RPM external mysql 5.0.45 |
2 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib/mysql |
3 |
|
|
4 |
|
#Different download locations according to the version. |
6 |
|
%if "%(echo %realversion | cut -d. -f1)" == "4" |
7 |
|
%define source http://downloads.mysql.com/archives/mysql-4.0/%n-%realversion.tar.gz |
8 |
|
%else |
9 |
< |
%define source http://mysql.belnet.be/Downloads/MySQL-5.0/mysql-%realversion.tar.gz |
9 |
> |
%define source http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-%realversion.tar.gz |
10 |
|
%endif |
11 |
|
|
12 |
|
Source: %source |
26 |
|
./configure --prefix=%i --with-extra-charsets=complex \ |
27 |
|
--enable-thread-safe-client --enable-local-infile |
28 |
|
make %makeprocesses |
29 |
+ |
|
30 |
|
%install |
31 |
|
make install |
32 |
|
perl -p -i -e "s|^#!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -r -e "^#!.*perl.*" %i | cut -d: -f1) |
33 |
+ |
rm -fR %i/mysql-test |
34 |
+ |
|
35 |
+ |
# SCRAM ToolBox toolfile |
36 |
+ |
mkdir -p %i/etc/scram.d |
37 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
38 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
39 |
+ |
<Tool name=%n version=%v> |
40 |
+ |
<Lib name=mysqlclient> |
41 |
+ |
<Client> |
42 |
+ |
<Environment name=MYSQL_BASE default="%i"></Environment> |
43 |
+ |
<Environment name=LIBDIR default="$MYSQL_BASE/lib/mysql"></Environment> |
44 |
+ |
<Environment name=MYSQL_BINDIR default="$MYSQL_BASE/bin"></Environment> |
45 |
+ |
<Environment name=INCLUDE default="$MYSQL_BASE/include/mysql"></Environment> |
46 |
+ |
</Client> |
47 |
+ |
<Runtime name=PATH value="$MYSQL_BINDIR" type=path> |
48 |
+ |
</Tool> |
49 |
+ |
EOF_TOOLFILE |
50 |
+ |
|
51 |
|
%post |
52 |
|
%{relocateConfig}bin/msql2mysql |
53 |
|
%{relocateConfig}bin/mysqlaccess |
57 |
|
%{relocateConfig}bin/mysqld_safe |
58 |
|
%{relocateConfig}bin/mysql_fix_privilege_tables |
59 |
|
%{relocateConfig}bin/mysql_install_db |
60 |
+ |
%{relocateConfig}etc/scram.d/%n |
61 |
|
|
62 |
|
|