Created
June 4, 2013 12:19
-
-
Save yawn/5705500 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VARNISH_VERSION=3.0.3 | |
VMOD_REPOSITORY=https://github.com/vimeo/libvmod-boltsort.git | |
VMOD_NAME=libvmod-boltsort | |
VMOD_VERSION='1.0.0' | |
VMOD_LICENSE='Apache License 2.0' | |
VMOD_VENDOR='Vimeo, LLC' | |
VMOD_DESCRIPTION='Sort query strings in Varnish' | |
sudo yum install -y pcre-devel python-docutils | |
sudo gem install fpm | |
pushd /tmp | |
if [ ! -d varnish ]; then | |
git clone --progress --recursive git://github.com/varnish/Varnish-Cache.git varnish | |
fi | |
cd varnish | |
git fetch | |
git checkout varnish-$VARNISH_VERSION | |
sed -i '' 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac | |
make clean | |
nice ./autogen.sh | |
nice ./configure | |
nice make | |
cd /tmp | |
if [ ! -d $VMOD_NAME ]; then | |
git clone --progress --recursive $VMOD_REPOSITORY $VMOD_NAME | |
fi | |
cd $VMOD_NAME | |
git fetch | |
git checkout master | |
mkdir -p build | |
export VARNISHSRC=/tmp/varnish | |
export VMODDIR=/tmp/$VMOD_NAME/build | |
sed -i '' 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac | |
make clean | |
nice ./autogen.sh | |
nice ./configure | |
nice make | |
make install | |
cd build | |
fpm -f \ | |
-t rpm \ | |
-s dir \ | |
--prefix=/usr/lib64/varnish/vmods \ | |
-n $VMOD_NAME \ | |
-v $VMOD_VERSION \ | |
--iteration `git rev-parse --short HEAD` \ | |
--epoch `date +"%s"` \ | |
-a noarch \ | |
-d 'varnish' \ | |
--license "$VMOD_LICENSE" \ | |
--vendor "$VMOD_VENDOR" \ | |
--description "$VMOD_DESCRIPTION" \ | |
--url "`echo $VMOD_REPOSITORY | sed 's/\.git$//'`" \ | |
* | |
popd | |
mv -f $VMODDIR/*.rpm . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment