Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Build protoc & netty |
| 4 | set -ev |
| 5 | |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 6 | # Make protoc |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 7 | # Can't check for presence of directory as cache auto-creates it. |
| 8 | if [ -f /tmp/proto3-a2/bin/protoc ]; then |
| 9 | echo "Not building protobuf. Already built" |
| 10 | else |
| 11 | wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | tar xz -C /tmp |
| 12 | pushd /tmp/protobuf-3.0.0-alpha-2 |
| 13 | ./autogen.sh |
| 14 | # install here so we don't need sudo |
| 15 | ./configure --prefix=/tmp/proto3-a2 |
| 16 | make -j2 |
| 17 | make install |
| 18 | popd |
| 19 | fi |
Louis Ryan | c42c8c4 | 2015-03-18 16:31:38 -0700 | [diff] [blame] | 20 | |
| 21 | # Make and install netty |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 22 | pushd lib/netty |
| 23 | BUILD_NETTY=1 |
Eric Anderson | 1605578 | 2015-03-20 12:03:48 -0700 | [diff] [blame] | 24 | NETTY_REV_FILE="$HOME/.m2/repository/io/netty/netty-ver" |
Eric Anderson | a0acb9b | 2015-03-20 10:26:00 -0700 | [diff] [blame] | 25 | REV="$(git rev-parse HEAD)" |
| 26 | if [ -f "$NETTY_REV_FILE" ]; then |
| 27 | REV_LAST="$(cat "$NETTY_REV_FILE")" |
| 28 | if [ z"$REV" = z"$REV_LAST" ]; then |
| 29 | BUILD_NETTY=0 |
| 30 | echo "Not building Netty; already at $REV" |
| 31 | fi |
| 32 | fi |
| 33 | if [ $BUILD_NETTY = 1 ]; then |
| 34 | mvn install -pl codec-http2 -am -DskipTests=true |
| 35 | echo "$REV" > "$NETTY_REV_FILE" |
| 36 | fi |
| 37 | popd |