Skip to content

Instantly share code, notes, and snippets.

@pfigue
Last active August 29, 2015 14:05
Show Gist options
  • Save pfigue/13c8e1c3dbd7256cb562 to your computer and use it in GitHub Desktop.
Save pfigue/13c8e1c3dbd7256cb562 to your computer and use it in GitHub Desktop.
Packaging Redis 3.0.0beta8 (Redis Cluster) via fpm
# Build requirements: wget, gcc, make, fpm, tcl (>=8.5)
SOURCE=https://github.com/antirez/redis/archive/3.0.0-beta8.tar.gz
VERSION=3.0.0beta8
ARCH=amd64
BUILD_DIR=/home/ubuntu/builder/
cd $BUILD_DIR
rm -rf redis-$VERSION
wget $SOURCE -O redis-$VERSION.tar.gz
tar -xzvf redis-$VERSION.tar.gz
cd redis-$VERSION
make MALLOC=jemalloc
make test
rm -rf /tmp/redis-$VERSION.$$
mkdir /tmp/redis-$VERSION.$$
mkdir -p /tmp/redis-$VERSION.$$/usr/bin
mkdir -p /tmp/redis-$VERSION.$$/etc
cp src/{redis-sentinel,redis-cli,redis-server,redis-trib.rb,redis-check-aof,redis-benchmark,redis-check-dump} /tmp/redis-$VERSION.$$/usr/bin
cp redis.conf /tmp/redis-$VERSION.$$/etc/redis.conf
# FIXME add upstart task cp redis /tmp/redis-$VERSION.$$/etc/init/redis
cd ..
fpm -sdir -t deb -n redis -v $VERSION -C /tmp/redis-$VERSION -p redis-${VERSION}_$ARCH.deb usr/bin
rm -rf /tmp/redis-$VERSION.$$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment