aboutsummaryrefslogtreecommitdiff
blob: 6914866de322f034ad16735887a5b6e47a592ca7 (plain)
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
# Blatently stolen from https://github.com/lxmx/gentoo-overlay

EAPI="4"

DESCRIPTION="Omnibus installation of ChefDK"
HOMEPAGE="http://www.opscode.com/chefdk/install/"
#SRC_URI="https://packages.chef.io/stable/ubuntu/12.04/chefdk_${PV}-1_amd64.deb"
SRC_URI="https://packages.chef.io/files/stable/chefdk/${PV}/ubuntu/16.04/chefdk_${PV}-1_amd64.deb"

LICENSE="Apache"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_unpack() {
  unpack ${A} ./data.tar.gz
}

src_install() {

  local dest="${D}/opt"
  mkdir -p "$dest"

  # cleanup .git folders, any idea why they are in the package?
  find "$dest" -type d -name ".git" | xargs  rm -rf

  cp -pR ./opt/* "$dest"

  # link executables
  binaries="berks chef chef-apply chef-shell chef-solo chef-zero delivery fauxhai foodcritic kitchen knife ohai push-apply pushy-client pushy-service-manager rubocop cookstyle chef-client chef-vault print_execution_environment inspec dco"
  for binary in $binaries; do
    dosym "$dest/chefdk/bin/$binary" "/usr/bin/$binary" || die "Cannot link $binary to /usr/bin"
  done

}