Commit 1f0acbc8f5b761a57dc5b8a2f4ccec9f75b6704b
1 parent
89cac277
Exists in
master
and in
13 other branches
Add mysql software definition from Robby Dyer
https://github.com/robbydyer/omnibus-software/blob/afed21ff7f0268c3e2dcce625193e171020e2940/config/software/mysql.rb
Showing
1 changed file
with
69 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,69 @@ |
1 | +# | |
2 | +# Copyright:: Copyright (c) 2013 Robby Dyer | |
3 | +# License:: Apache License, Version 2.0 | |
4 | +# | |
5 | +# Licensed under the Apache License, Version 2.0 (the "License"); | |
6 | +# you may not use this file except in compliance with the License. | |
7 | +# You may obtain a copy of the License at | |
8 | +# | |
9 | +# http://www.apache.org/licenses/LICENSE-2.0 | |
10 | +# | |
11 | +# Unless required by applicable law or agreed to in writing, software | |
12 | +# distributed under the License is distributed on an "AS IS" BASIS, | |
13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | +# See the License for the specific language governing permissions and | |
15 | +# limitations under the License. | |
16 | +# | |
17 | +name "mysql" | |
18 | +version "5.5.25a" | |
19 | + | |
20 | +dependencies [ | |
21 | + "libevent", | |
22 | + "openssl", | |
23 | + "zlib", | |
24 | + "ncurses" | |
25 | + ] | |
26 | + | |
27 | +source :url => "http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.25a.tar.gz", | |
28 | + :md5 => "0841fbc79872c5f467d8c8842f45257a" | |
29 | + | |
30 | +relative_path "mysql-#{version}" | |
31 | + | |
32 | +env = { | |
33 | + "LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | |
34 | + "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | |
35 | + "CXXFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | |
36 | + "CPPFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | |
37 | + "LD_RUN_PATH" => "#{install_dir}/embedded/lib", | |
38 | + "LD_LIBRARY_PATH" => "#{install_dir}/embedded/lib", | |
39 | + "PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}", | |
40 | +} | |
41 | + | |
42 | +# Force CentOS-5 to use gcc/g++ v4.4 | |
43 | +if OHAI.platform =~ /centos/ and OHAI.platform_version =~ /^5/ | |
44 | + env.merge!( { | |
45 | + "CC" => "gcc44", | |
46 | + "CXX" => "g++44" | |
47 | + }) | |
48 | +end | |
49 | + | |
50 | +build do | |
51 | + | |
52 | + command [ | |
53 | + "cmake", | |
54 | + "-DCMAKE_SKIP_RPATH=YES", | |
55 | + "-DCMAKE_INSTALL_PREFIX=#{install_dir}/embedded", | |
56 | + "-DWITH_SSL=system", | |
57 | + "-DOPENSSL_INCLUDE_DIR:PATH=#{install_dir}/embedded/include", | |
58 | + "-DOPENSSL_LIBRARIES:FILEPATH=#{install_dir}/embedded/lib/libssl.so", | |
59 | + "-DWITH_ZLIB=system", | |
60 | + "-DZLIB_INCLUDE_DIR:PATH=#{install_dir}/embedded/include", | |
61 | + "-DZLIB_LIBRARY:FILEPATH=#{install_dir}/embedded/lib/libz.so", | |
62 | + "-DCRYPTO_LIBRARY:FILEPATH=#{install_dir}/embedded/lib/libcrypto.so", | |
63 | + "-DWITH_BUNDLED_LIBEVENT=off", | |
64 | + "-DMYSQL_UNIX_ADDR=#{install_dir}/embedded/data/mysql.sock", | |
65 | + ".", | |
66 | + ].join(" "), :env => env | |
67 | + command "make -j #{max_build_jobs}", :env => env | |
68 | + command "make install", :env => env | |
69 | +end | ... | ... |