Compare commits
2 Commits
master
...
branch-0.1
Author | SHA1 | Date | |
---|---|---|---|
|
239e54de8e | ||
|
21984e8289 |
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=1.0
|
||||
VERSION=0.10
|
||||
|
||||
if test -f version
|
||||
then
|
||||
|
23
dist/redhat/build_rpm.sh
vendored
23
dist/redhat/build_rpm.sh
vendored
@ -1,14 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
RPMBUILD=build/rpmbuild
|
||||
RPMBUILD=`pwd`/build/rpmbuild
|
||||
|
||||
if [ ! -e dist/redhat/build_rpm.sh ]; then
|
||||
echo "run build_rpm.sh in top of scylla-jmx dir"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f /usr/bin/git ] || [ ! -f /usr/bin/mock ] || [ ! -f /usr/bin/rpmbuild ]; then
|
||||
sudo yum install -y git mock rpm-build
|
||||
|
||||
sudo yum install -y rpm-build git
|
||||
|
||||
OS=`awk '{print $1}' /etc/redhat-release`
|
||||
if [ "$OS" = "Fedora" ] && [ ! -f /usr/bin/mock ]; then
|
||||
sudo yum -y install mock
|
||||
elif [ "$OS" = "CentOS" ] && [ ! -f /usr/bin/yum-builddep ]; then
|
||||
sudo yum -y install yum-utils
|
||||
fi
|
||||
|
||||
VERSION=$(./SCYLLA-VERSION-GEN)
|
||||
SCYLLA_VERSION=$(cat build/SCYLLA-VERSION-FILE)
|
||||
SCYLLA_RELEASE=$(cat build/SCYLLA-RELEASE-FILE)
|
||||
@ -17,5 +24,11 @@ git archive --format=tar --prefix=scylla-jmx-$SCYLLA_VERSION/ HEAD -o build/rpmb
|
||||
cp dist/redhat/scylla-jmx.spec.in $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
sed -i -e "s/@@VERSION@@/$SCYLLA_VERSION/g" $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
rpmbuild -bs --define "_topdir $RPMBUILD" -ba $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
/usr/bin/mock rebuild --resultdir=`pwd`/build/rpms $RPMBUILD/SRPMS/scylla-jmx-$VERSION*.src.rpm
|
||||
|
||||
if [ "$OS" = "Fedora" ]; then
|
||||
rpmbuild -bs --define "_topdir $RPMBUILD" $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
/usr/bin/mock rebuild --resultdir=`pwd`/build/rpms $RPMBUILD/SRPMS/scylla-jmx-$VERSION*.src.rpm
|
||||
else
|
||||
sudo yum-builddep -y $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
rpmbuild -ba --define "_topdir $RPMBUILD" $RPMBUILD/SPECS/scylla-jmx.spec
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user