aboutsummaryrefslogtreecommitdiff
path: root/bigtop_toolchain
diff options
context:
space:
mode:
authorOlaf Flebbe <of@oflebbe.de>2015-10-13 22:26:48 +0200
committerOlaf Flebbe <of@oflebbe.de>2015-10-21 16:12:26 +0200
commit2c2579cf5d1a3dc8589543298318e5c2757bab67 (patch)
tree04b0bdf72baadd881a0009edfff823b8cf1b9515 /bigtop_toolchain
parent2bf76ff0fc8d3b9f78d3805f10cf9160be6263ec (diff)
downloadbigtop-odpi-2c2579cf5d1a3dc8589543298318e5c2757bab67.tar.gz
BIGTOP-2088: Support protobuf installation for OPENPOWER
Diffstat (limited to 'bigtop_toolchain')
-rw-r--r--bigtop_toolchain/manifests/protobuf.pp41
1 files changed, 23 insertions, 18 deletions
diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp
index e69d9095..ca5ec278 100644
--- a/bigtop_toolchain/manifests/protobuf.pp
+++ b/bigtop_toolchain/manifests/protobuf.pp
@@ -19,35 +19,40 @@ class bigtop_toolchain::protobuf {
case $operatingsystem{
/Ubuntu|Debian/: {
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotobuf8_2.5.0-9ubuntu1_amd64.deb':
+ case $architecture {
+ 'amd64' : { $url = "https://launchpad.net/ubuntu/+archive/primary/+files"
+ $arch= "amd64" }
+ 'ppc64le' : { $url = "https://bintray.com/artifact/download/oflebbe/bigtop-protobuf"
+ $arch= "ppc64el" }
+ }
+ }
+ }
+
+ case $operatingsystem{
+ /Ubuntu|Debian/: {
+ exec { "/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/libprotobuf8_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/libprotobuf8_2.5.0-9ubuntu1_$arch.deb",
}
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotoc8_2.5.0-9ubuntu1_amd64.deb':
+ exec { "/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/libprotoc8_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/libprotoc8_2.5.0-9ubuntu1_$arch.deb",
}
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb':
+ exec { "/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb",
}
- exec {'/usr/bin/dpkg -i protobuf-compiler_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i protobuf-compiler_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => [ EXEC["/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_amd64.deb"],EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb"] ]
+ require => [ EXEC["/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb"] ]
}
- exec {'/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => [ EXEC["/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_amd64.deb"],EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotoc8_2.5.0-9ubuntu1_amd64.deb"] ]
+ require => [ EXEC["/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb"] ]
}
- exec {'/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotobuf8_2.5.0-9ubuntu1_amd64.deb"],
+ require => EXEC["/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb"],
}
}
default: {