Created
March 15, 2012 15:28
-
-
Save riywo/2044803 to your computer and use it in GitHub Desktop.
fluent-agent-liteのrpm作るだけのshell
This file contains 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/sh | |
if [ -z "$1" ]; then | |
echo "usage: ./make-rpm.sh 0.2" | |
exit 1 | |
fi | |
version=$1 | |
cur=`pwd` | |
rm -f fluent-agent-lite.v$version.tar.gz | |
rm -fr fluent-agent-lite | |
wget --no-check-certificate https://github.com/downloads/tagomoris/fluent-agent-lite/fluent-agent-lite.v$version.tar.gz | |
tar xvzf fluent-agent-lite.v$version.tar.gz | |
# setup rpmbuild env | |
echo "%_topdir $cur/rpmbuild/" > ~/.rpmmacros | |
rm -fR rpmbuild | |
mkdir rpmbuild | |
pushd rpmbuild | |
mkdir BUILD RPMS SOURCES SPECS SRPMS | |
# locate spec | |
cp ../fluent-agent-lite/SPECS/fluent-agent-lite.spec SPECS | |
# locate source tarball | |
mv ../fluent-agent-lite.v$version.tar.gz SOURCES | |
# locate conf | |
cp ../fluent-agent-lite/package/fluent-agent-lite.conf SOURCES | |
# locate init.d script | |
cp ../fluent-agent-lite/package/fluent-agent-lite.init SOURCES | |
# build | |
rpmbuild -v -ba --clean SPECS/fluent-agent-lite.spec | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment