ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mysql.spec
Revision: 1.18
Committed: Fri Nov 2 16:40:18 2007 UTC (17 years, 5 months ago) by elmer
Branch: MAIN
CVS Tags: pe20071102b-ports
Changes since 1.17: +1 -1 lines
Log Message:
Update to -CMS18 (first round of these)

File Contents

# User Rev Content
1 elmer 1.18 ### RPM external mysql 5.0.18-CMS18
2 eulisse 1.5 ## INITENV +PATH LD_LIBRARY_PATH %i/lib/mysql
3    
4 eulisse 1.3 #Different download locations according to the version.
5    
6 elmer 1.14 %if "%(echo %realversion | cut -d. -f1)" == "4"
7     %define source http://downloads.mysql.com/archives/mysql-4.0/%n-%realversion.tar.gz
8 eulisse 1.3 %else
9 muzaffar 1.17 %define source http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-%realversion.tar.gz
10 eulisse 1.3 %endif
11    
12     Source: %source
13 eulisse 1.6 # Let's fake the fact that we have perl (DBI) so that rpm does not complain.
14     Provides: perl(DBI)
15 argiro 1.1
16     %prep
17 elmer 1.14 %setup -n %n-%realversion
18 argiro 1.1 %ifos darwin
19     # There's for some reason a "-traditional-cpp", which breaks with GCC 3.3
20     # so remove it. (FIXME: check if this is solved in a newer version.)
21     perl -p -i -e 's/-traditional-cpp/-no-cpp-precomp/g' configure.in configure
22     %endif
23    
24     %build
25     CFLAGS=-O3 CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
26     ./configure --prefix=%i --with-extra-charsets=complex \
27     --enable-thread-safe-client --enable-local-infile
28 eulisse 1.2 make %makeprocesses
29 muzaffar 1.17
30 eulisse 1.8 %install
31     make install
32 eulisse 1.11 perl -p -i -e "s|^#!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -r -e "^#!.*perl.*" %i | cut -d: -f1)
33 muzaffar 1.17
34     # SCRAM ToolBox toolfile
35     mkdir -p %i/etc/scram.d
36     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
37     <doc type=BuildSystem::ToolDoc version=1.0>
38     <Tool name=%n version=%v>
39     <Lib name=mysqlclient>
40     <Client>
41     <Environment name=MYSQL_BASE default="%i"></Environment>
42     <Environment name=LIBDIR default="$MYSQL_BASE/lib/mysql"></Environment>
43     <Environment name=MYSQL_BINDIR default="$MYSQL_BASE/bin"></Environment>
44     <Environment name=INCLUDE default="$MYSQL_BASE/include/mysql"></Environment>
45     </Client>
46     <Runtime name=PATH value="$MYSQL_BINDIR" type=path>
47     </Tool>
48     EOF_TOOLFILE
49    
50 eulisse 1.4 %post
51     %{relocateConfig}bin/msql2mysql
52     %{relocateConfig}bin/mysqlaccess
53     %{relocateConfig}bin/mysqlbug
54     %{relocateConfig}bin/mysql_config
55     %{relocateConfig}bin/mysqld_multi
56     %{relocateConfig}bin/mysqld_safe
57     %{relocateConfig}bin/mysql_fix_privilege_tables
58     %{relocateConfig}bin/mysql_install_db
59 muzaffar 1.17 %{relocateConfig}etc/scram.d/%n
60    
61 eulisse 1.4