build RPM from local folder instead of git repo

This commit is contained in:
Ilya Kisleyko 2020-06-09 18:28:08 +00:00
parent 113f13855a
commit b9d2fd00e6
2 changed files with 4 additions and 11 deletions

View File

@ -5,7 +5,6 @@
TURNVERSION=4.5.1.2
BUILDDIR=~/rpmbuild
ARCH=`uname -p`
TURNSERVER_GIT_URL=https://github.com/coturn/coturn.git
WGETOPTIONS="--no-check-certificate"
RPMOPTIONS="-ivh --force"

View File

@ -18,18 +18,11 @@ fi
# TURN
#create archive from local folder
cd ${BUILDDIR}/tmp
rm -rf turnserver-${TURNVERSION}
git clone ${TURNSERVER_GIT_URL} --branch ${TURNVERSION} turnserver-${TURNVERSION}
ER=$?
if ! [ ${ER} -eq 0 ] ; then
git clone ${TURNSERVER_GIT_URL} turnserver-${TURNVERSION}
ER=$?
if ! [ ${ER} -eq 0 ] ; then
cd ${CPWD}
exit -1
fi
fi
mkdir -p ${BUILDDIR}/tmp/turnserver-${TURNVERSION}
cp -R ${CPWD}/.. ${BUILDDIR}/tmp/turnserver-${TURNVERSION}
tar zcf ${BUILDDIR}/SOURCES/turnserver-${TURNVERSION}.tar.gz turnserver-${TURNVERSION}
ER=$?
@ -38,6 +31,7 @@ if ! [ ${ER} -eq 0 ] ; then
exit -1
fi
#build package from archive
rpmbuild -ta ${BUILDDIR}/SOURCES/turnserver-${TURNVERSION}.tar.gz
ER=$?
if ! [ ${ER} -eq 0 ] ; then