summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2016-11-04 08:04:32 -0500
committerMonty Taylor <mordred@inaugust.com>2016-11-06 07:52:22 -0600
commit2b5aa82b70d8974198b0080f719d68581b7b9d43 (patch)
tree224b5204418bead4d0eaf7d99708e1601c6ca7a9
parent97e1650760733cd74d89be3ea3234ef3c9c57fb0 (diff)
Add scripts to install proto3 from source0.0.1
Notes
Notes (review): Verified-1: Jenkins Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Monty Taylor <mordred@inaugust.com> Submitted-by: Monty Taylor <mordred@inaugust.com> Submitted-at: Sun, 06 Nov 2016 14:09:08 +0000 Reviewed-on: https://review.openstack.org/393742 Project: openstack/oaktreemodel Branch: refs/heads/master
-rw-r--r--Makefile.am4
-rw-r--r--bindep.txt4
-rwxr-xr-xbootstrap.sh6
-rw-r--r--configure.ac2
-rwxr-xr-xinstall_proto3.sh42
5 files changed, 53 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 443c3d9..1634088 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,6 @@ DIST_SUBDIRS = ${SUBDIRS}
26BUILT_SOURCES= 26BUILT_SOURCES=
27BUILT_MAINT_SRC= 27BUILT_MAINT_SRC=
28EXTRA_DIST= \ 28EXTRA_DIST= \
29 ChangeLog \
30 config/pandora_vc_revinfo \ 29 config/pandora_vc_revinfo \
31 ${top_srcdir}/m4/*m4 30 ${top_srcdir}/m4/*m4
32 31
@@ -35,7 +34,6 @@ DISTCLEANFILES= config/top.h
35 34
36MAINTAINERCLEANFILES= 35MAINTAINERCLEANFILES=
37MAINTAINERCLEANFILES+= autom4te.cache 36MAINTAINERCLEANFILES+= autom4te.cache
38MAINTAINERCLEANFILES+= ChangeLog
39 37
40maintainer-clean-local: 38maintainer-clean-local:
41 find . -type f -name '*~' -exec rm -f '{}' \; 39 find . -type f -name '*~' -exec rm -f '{}' \;
@@ -114,7 +112,7 @@ EXTRA_DIST += \
114 oaktreemodel/security_group.proto \ 112 oaktreemodel/security_group.proto \
115 oaktreemodel/oaktree.proto 113 oaktreemodel/oaktree.proto
116 114
117SUFFIXES += .proto .grpc.pb.cc .pb.cc .pb.h py .pb.go 115SUFFIXES += .proto .grpc.pb.cc .grpc.pb.h .pb.cc .pb.h py .pb.go
118PROTOS_PATH=${top_srcdir}/oaktreemodel 116PROTOS_PATH=${top_srcdir}/oaktreemodel
119PROTO_OUTPUT=${top_builddir}/oaktreemodel 117PROTO_OUTPUT=${top_builddir}/oaktreemodel
120.proto.grpc.pb.cc: 118.proto.grpc.pb.cc:
diff --git a/bindep.txt b/bindep.txt
index fdfa7df..f436dc0 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -1,7 +1,7 @@
1libprotobuf-dev
2protobuf-compiler
3pkg-config 1pkg-config
4build-essential 2build-essential
5autoconf 3autoconf
4automake
6libtool 5libtool
7golang-go 6golang-go
7curl
diff --git a/bootstrap.sh b/bootstrap.sh
index 5a14fe6..710c405 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -14,4 +14,10 @@
14# See the License for the specific language governing permissions and 14# See the License for the specific language governing permissions and
15# limitations under the License. 15# limitations under the License.
16 16
17if ! protoc --version | grep -q 3\. ; then
18 echo "Protobuf v3 required - installing"
19 bash install_proto3.sh
20fi
21pip install pbr
22
17autoreconf -fi 23autoreconf -fi
diff --git a/configure.ac b/configure.ac
index 1ccaaba..1818db2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,8 @@ AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
111 LDFLAGS="${LDFLAGS} ${LD_VERSION_SCRIPT}" 111 LDFLAGS="${LDFLAGS} ${LD_VERSION_SCRIPT}"
112 ]) 112 ])
113 113
114AM_CXXFLAGS="-std=c++11 $AM_CXXFLAGS"
115
114AC_CONFIG_FILES([Makefile]) 116AC_CONFIG_FILES([Makefile])
115 117
116AC_OUTPUT 118AC_OUTPUT
diff --git a/install_proto3.sh b/install_proto3.sh
new file mode 100755
index 0000000..3b1fd33
--- /dev/null
+++ b/install_proto3.sh
@@ -0,0 +1,42 @@
1#!/bin/bash
2# Copyright (c) 2016 Red Hat, Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17if [ -z $GOPATH ]; then
18 echo "oaktreemodel requires a golang environment."
19 echo "Please set GOPATH and make sure GOPATH/bin is in your PATH."
20 exit 1
21fi
22GRPCDIR=$GOPATH/src/github.com/grpc/grpc
23GRPCVER=$(curl -L http://grpc.io/release)
24mkdir -p $(dirname $GRPCDIR)
25git clone -b $GRPCVER https://github.com/grpc/grpc $GRPCDIR
26pushd $GRPCDIR
27
28git submodule update --init
29make
30if [ $(id -u) = '0' ] ; then
31 SUDO=
32else
33 SUDO=sudo
34fi
35$SUDO make install
36cd third_party/protobuf
37$SUDO make install
38
39popd
40
41go get google.golang.org/grpc
42go get -u github.com/golang/protobuf/{proto,protoc-gen-go}