Skip to content

Instantly share code, notes, and snippets.

@rcrowley
Created December 19, 2012 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcrowley/4338665 to your computer and use it in GitHub Desktop.
Save rcrowley/4338665 to your computer and use it in GitHub Desktop.
VERSION="2.4.1"
BUILD="betable1"
set -e -x
OLDESTPWD="$PWD"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -O "http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz"
tar xf "protobuf-2.4.1.tar.gz"
cd "protobuf-2.4.1"
./configure --prefix="/usr"
make
mkdir "rootfs"
make install DESTDIR="$PWD/rootfs"
echo "/sbin/ldconfig" >"after-install"
fakeroot fpm -C "rootfs" \
--after-install "after-install" \
-m "Richard Crowley <richard@betable.com>" \
-n "protobuf" -v "$VERSION-$BUILD" \
-p "$OLDESTPWD/protobuf_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" "usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment