Last active
January 3, 2016 12:39
-
-
Save rasschaert/8464573 to your computer and use it in GitHub Desktop.
Creates an RPM package for NSQ (distributed messaging platform written in Golang). Tested on CentOS 6 x86_64 with EPEL and Golang 1.2.
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
#!/bin/bash | |
echo 'Downloading pre-built binaries' | |
wget https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.2.24.linux-amd64.go1.2.tar.gz | |
echo 'Extracting archive' | |
tar xzf nsq-0.2.24.linux-amd64.go1.2.tar.gz | |
echo 'Creating correct directory structure' | |
mkdir -p nsq-0.2.24.linux-amd64.go1.2/usr/local/ | |
mv nsq-0.2.24.linux-amd64.go1.2/{bin,share} nsq-0.2.24.linux-amd64.go1.2/usr/local/ | |
echo 'Building package with fpm' | |
fpm -s dir -t rpm -n nsq -v 0.2.24 --iteration 'go1.2' -a x86_64 -C nsq-0.2.24.linux-amd64.go1.2 . | |
echo 'Cleaning up' | |
rm -rf nsq-0.2.24.linux-amd64.go1.2 | |
rm nsq-0.2.24.linux-amd64.go1.2.tar.gz | |
echo 'Done!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment