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_mod_esl:%define build_mod_esl 1 }
|
||||
|
||||
%define version %{VERSION_NUMBER}
|
||||
%define release %{BUILD_NUMBER}
|
||||
%define version 1.5.16
|
||||
%define release 1
|
||||
|
||||
######################################################################################################################
|
||||
#
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
||||
|
||||
src_repo="$(pwd)"
|
||||
tmp_dir=${TMP_DIR:="/tmp"}
|
||||
tmp_dir=${TMP_DIR:=".."}
|
||||
|
||||
zgrep () { (echo "$2" | grep -e "$1" >/dev/null); }
|
||||
|
||||
|
@ -99,10 +99,11 @@ parse_version () {
|
|||
|
||||
set_fs_ver () {
|
||||
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_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.$$
|
||||
mv configure.ac.$$ configure.ac
|
||||
if [ -n "$rev" ]; then
|
||||
|
@ -114,6 +115,13 @@ set_fs_ver () {
|
|||
configure.ac > configure.ac.$$
|
||||
mv configure.ac.$$ configure.ac
|
||||
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 () {
|
||||
|
|
|
@ -19,18 +19,11 @@ dst_dir="/tmp/$dst_name"
|
|||
cd $src_repo
|
||||
cp -a src_dist/* rpmbuild/SOURCES/ || true
|
||||
|
||||
rpmbuild --define "VERSION_NUMBER $cver" \
|
||||
--define "BUILD_NUMBER $build" \
|
||||
--define "_topdir %(pwd)/rpmbuild" \
|
||||
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
|
||||
--define "_rpmdir %{_topdir}" \
|
||||
--define "_srcrpmdir %{_topdir}" \
|
||||
-ba freeswitch.spec
|
||||
|
||||
# --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
|
||||
# --define "_sourcedir %{_topdir}" \
|
||||
# --define "_builddir %{_topdir}" \
|
||||
|
||||
|
||||
mkdir $src_repo/RPMS
|
||||
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
|
||||
|
||||
|
|
|
@ -6,14 +6,16 @@ sdir="."
|
|||
. $sdir/common.sh
|
||||
|
||||
check_pwd
|
||||
check_input_ver_build $@
|
||||
eval $(parse_version "$1")
|
||||
version=`cat build/next-release.txt`
|
||||
check_input_ver_build $version
|
||||
eval $(parse_version "$version")
|
||||
if [ -n "$grev" ]; then
|
||||
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
|
||||
else
|
||||
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
||||
fi
|
||||
|
||||
#This should be a RAM Drive
|
||||
dst_dir="${tmp_dir}/jenkins.$$/$dst_name"
|
||||
|
||||
if [ -d "$dst_dir" ]; then
|
||||
|
|
Loading…
Reference in New Issue