Tweaks for building packages
This commit is contained in:
parent
7c6367052c
commit
6f13748800
|
@ -1 +1 @@
|
||||||
1.3.4
|
1.5.16
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
%{?with_timerfd:%define build_timerfd 1 }
|
%{?with_timerfd:%define build_timerfd 1 }
|
||||||
%{?with_mod_esl:%define build_mod_esl 1 }
|
%{?with_mod_esl:%define build_mod_esl 1 }
|
||||||
|
|
||||||
%define version %{VERSION_NUMBER}
|
%define version 1.5.16
|
||||||
%define release %{BUILD_NUMBER}
|
%define release 1
|
||||||
|
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
||||||
|
|
||||||
src_repo="$(pwd)"
|
src_repo="$(pwd)"
|
||||||
tmp_dir=${TMP_DIR:="/tmp"}
|
tmp_dir=${TMP_DIR:=".."}
|
||||||
|
|
||||||
zgrep () { (echo "$2" | grep -e "$1" >/dev/null); }
|
zgrep () { (echo "$2" | grep -e "$1" >/dev/null); }
|
||||||
|
|
||||||
|
@ -99,10 +99,11 @@ parse_version () {
|
||||||
|
|
||||||
set_fs_ver () {
|
set_fs_ver () {
|
||||||
local ver="$1" major="$2" minor="$3" micro="$4" rev="$5" hrev="$6"
|
local ver="$1" major="$2" minor="$3" micro="$4" rev="$5" hrev="$6"
|
||||||
sed -e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
|
sed \
|
||||||
|
-e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
|
||||||
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
|
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
|
||||||
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
|
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
|
||||||
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], BUG-REPORT-ADDRESS)\)|\1$ver\2|" \
|
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], bugs@freeswitch.org)\)|\1$ver\2|" \
|
||||||
configure.ac > configure.ac.$$
|
configure.ac > configure.ac.$$
|
||||||
mv configure.ac.$$ configure.ac
|
mv configure.ac.$$ configure.ac
|
||||||
if [ -n "$rev" ]; then
|
if [ -n "$rev" ]; then
|
||||||
|
@ -114,6 +115,13 @@ set_fs_ver () {
|
||||||
configure.ac > configure.ac.$$
|
configure.ac > configure.ac.$$
|
||||||
mv configure.ac.$$ configure.ac
|
mv configure.ac.$$ configure.ac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sed -e "s|\(%define version \).*|\1$major.$minor.$micro|" \
|
||||||
|
freeswitch.spec > freeswitch.spec.$$
|
||||||
|
mv freeswitch.spec.$$ freeswitch.spec
|
||||||
|
|
||||||
|
#%define version 1.5.16
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gnuize () {
|
gnuize () {
|
||||||
|
|
|
@ -19,18 +19,11 @@ dst_dir="/tmp/$dst_name"
|
||||||
cd $src_repo
|
cd $src_repo
|
||||||
cp -a src_dist/* rpmbuild/SOURCES/ || true
|
cp -a src_dist/* rpmbuild/SOURCES/ || true
|
||||||
|
|
||||||
rpmbuild --define "VERSION_NUMBER $cver" \
|
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
|
||||||
--define "BUILD_NUMBER $build" \
|
|
||||||
--define "_topdir %(pwd)/rpmbuild" \
|
|
||||||
--define "_rpmdir %{_topdir}" \
|
--define "_rpmdir %{_topdir}" \
|
||||||
--define "_srcrpmdir %{_topdir}" \
|
--define "_srcrpmdir %{_topdir}" \
|
||||||
-ba freeswitch.spec
|
-ba freeswitch.spec
|
||||||
|
|
||||||
# --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
|
|
||||||
# --define "_sourcedir %{_topdir}" \
|
|
||||||
# --define "_builddir %{_topdir}" \
|
|
||||||
|
|
||||||
|
|
||||||
mkdir $src_repo/RPMS
|
mkdir $src_repo/RPMS
|
||||||
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
|
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,16 @@ sdir="."
|
||||||
. $sdir/common.sh
|
. $sdir/common.sh
|
||||||
|
|
||||||
check_pwd
|
check_pwd
|
||||||
check_input_ver_build $@
|
version=`cat build/next-release.txt`
|
||||||
eval $(parse_version "$1")
|
check_input_ver_build $version
|
||||||
|
eval $(parse_version "$version")
|
||||||
if [ -n "$grev" ]; then
|
if [ -n "$grev" ]; then
|
||||||
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
|
||||||
else
|
else
|
||||||
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#This should be a RAM Drive
|
||||||
dst_dir="${tmp_dir}/jenkins.$$/$dst_name"
|
dst_dir="${tmp_dir}/jenkins.$$/$dst_name"
|
||||||
|
|
||||||
if [ -d "$dst_dir" ]; then
|
if [ -d "$dst_dir" ]; then
|
||||||
|
|
Loading…
Reference in New Issue