forked from berkshelf/berkshelf
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: nikhil2611 <[email protected]>
- Loading branch information
1 parent
5e88d7f
commit dd39706
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
export HAB_BLDR_CHANNEL="LTS-2024" | ||
_chef_client_ruby="core/ruby3_1" | ||
pkg_name="berkshelf" | ||
pkg_origin="chef" | ||
ruby_pkg="core/ruby3_1" | ||
pkg_maintainer="The Chef Maintainers <[email protected]>" | ||
pkg_description="Manage Chef Infra cookbooks and cookbook dependencies." | ||
pkg_license=('Apache-2.0') | ||
pkg_bin_dirs=( | ||
bin | ||
vendor/bin | ||
) | ||
pkg_deps=(${ruby_pkg} core/coreutils) | ||
pkg_bin_dirs=(bin) | ||
pkg_build_deps=( | ||
core/make | ||
core/bash | ||
core/gcc | ||
) | ||
pkg_deps=( | ||
$_chef_client_ruby | ||
core/coreutils | ||
core/git | ||
) | ||
pkg_svc_user=root | ||
|
||
do_setup_environment() { | ||
build_line 'Setting GEM_HOME="$pkg_prefix/vendor"' | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
} | ||
|
||
pkg_version() { | ||
cat "$SRC_PATH/VERSION" | ||
|
@@ -35,8 +35,8 @@ do_unpack() { | |
} | ||
|
||
do_build() { | ||
echo $(pkg_path_for $_chef_client_ruby) | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
|
||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
|
@@ -49,13 +49,13 @@ do_build() { | |
} | ||
|
||
do_install() { | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
gem install berkshelf-*.gem --no-document | ||
wrap_ruby_berkshelf | ||
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" | ||
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" | ||
} | ||
|
||
wrap_ruby_berkshelf() { | ||
|
@@ -76,10 +76,10 @@ set -e | |
export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH" | ||
# Set Ruby paths defined from 'do_setup_environment()' | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
export GEM_PATH="\$GEM_HOME" | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
export GEM_PATH="$GEM_PATH" | ||
exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@ | ||
exec $(pkg_path_for ${ruby_pkg})/bin/ruby $real_bin \$@ | ||
EOF | ||
chmod -v 755 "$bin" | ||
} | ||
|