ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mysql.spec
Revision: 1.17
Committed: Mon Sep 3 15:28:45 2007 UTC (17 years, 7 months ago) by muzaffar
Branch: MAIN
CVS Tags: CMSSW_1_7_7, dl080227for176, CMSSW_1_7_5_ONLINE1, CMSSW_1_7_5, CMSSW_1_7_5_g491, CMSSW_1_7_5_ONLINE, nr080115onl175, dl080111, ge20080109-webconddb, ge20080109-sitedb, CMSSW_1_7_4, CMSSW_1_7_3_g490p1, dl071212t2, dl071212, CMSSW_1_7_3, CMSSW_1_7_2, CMSSW_1_7_1, nr071121onl170_xdaq5, nr071120_fwlite170_1, CMSSW_1_7_0_ONLINE, CMSSW_1_7_0, nr071116onlpre13, CMSSW_1_7_0_pre13, dl071114, ap20071113, CMSSW_1_7_0_pre12, CMSSW_1_7_0_pre10_ONLINE, CMSSW_1_7_0_pre11, nr071105a, pe20071102a-ports, CMSSW_1_7_0_pre10, CMSSW_1_7_0_pre9, CMSSW_1_7_0_pre8, CMSSW_1_7_0_pre7, dl071028, dl071024, nr071023_fwlite170p6, pe20071023-170p6-amd64, forTony_001, pe20071021-170p6-zlib, dl071021t2, dl071021, pe20071021a-ports, dl071020, nr071017_170p5onl2, CMSSW_1_7_0_pre6, nr071016_170p5onl1, nr071016onl170p5bs, nr071016onl170p5, pe20071015-xrootd, pe20071014-ports, dl071014, dl071010t2, dl071010, dl071009t2, dl071009, CMSSW_1_7_0_pre5, dl070926t2, dl070926, ap-20070926, CMSSW_1_7_0_pre4, dl070921t2, dl070921, dl070920, CMSSW_1_7_0_pre3, dl070916, dl070912, dl070812, sm070912b, sm070912a, sm070911a, dl070909p3, dl070909, CMSSW_1_7_0_pre2, dl070906, dl070905, sm030907a
Changes since 1.16: +22 -2 lines
Log Message:
new spec files for auto generation of toolfile i.e. no need of scramtoolbox

File Contents

# Content
1 ### RPM external mysql 5.0.18-CMS8
2 ## INITENV +PATH LD_LIBRARY_PATH %i/lib/mysql
3
4 #Different download locations according to the version.
5
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://mirror.provenscaling.com/mysql/community/source/5.0/mysql-%realversion.tar.gz
10 %endif
11
12 Source: %source
13 # Let's fake the fact that we have perl (DBI) so that rpm does not complain.
14 Provides: perl(DBI)
15
16 %prep
17 %setup -n %n-%realversion
18 %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 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
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 %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 %{relocateConfig}etc/scram.d/%n
60
61