This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
packaging
64 lines (53 loc) · 1.94 KB
/
packaging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
#
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables
# Copy common utilities
cp -a common/* ${BOSH_INSTALL_TARGET}
# Install Yaml
tar xzfv ${BOSH_COMPILE_TARGET}/ruby/yaml-0.1.6.tar.gz
pushd ${BOSH_COMPILE_TARGET}/yaml-0.1.6
./configure --prefix=${BOSH_INSTALL_TARGET}
make
make install
ldconfig
popd
# Install Ruby
tar xzfv ${BOSH_COMPILE_TARGET}/ruby/ruby-2.3.0.tar.gz
pushd ${BOSH_COMPILE_TARGET}/ruby-2.3.0
LDFLAGS="-Wl,-rpath -Wl,${BOSH_INSTALL_TARGET}" ./configure --prefix=${BOSH_INSTALL_TARGET} --disable-install-doc --with-opt-dir=${BOSH_INSTALL_TARGET}
make
make install
popd
# Install Rubygems
tar xzfv ${BOSH_COMPILE_TARGET}/ruby/rubygems-2.6.2.tgz
pushd ${BOSH_COMPILE_TARGET}/rubygems-2.6.2
${BOSH_INSTALL_TARGET}/bin/ruby setup.rb
popd
# Install Bundler
${BOSH_INSTALL_TARGET}/bin/gem install ${BOSH_COMPILE_TARGET}/ruby/bundler-1.10.6.gem --no-ri --no-rdoc
# Install Bundler cache
pushd ${BOSH_COMPILE_TARGET}/google-fluentd-vendor
tar xvzf google-fluentd-vendor-0.14.25-plugin-0.6.15.tgz
mv vendor ${BOSH_INSTALL_TARGET}
popd
# Copy Google Fluentd
cp -a ${BOSH_COMPILE_TARGET}/google-fluentd/* ${BOSH_INSTALL_TARGET}/
# Install Google Fluentd
cd ${BOSH_INSTALL_TARGET}
echo "Running bundle"
${BOSH_INSTALL_TARGET}/bin/bundle install --local --deployment --binstubs