2012-05-05 23:24:46 -04:00
|
|
|
#!/bin/sh
|
2012-03-23 23:44:21 -04:00
|
|
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
|
|
|
|
2012-05-05 22:58:16 -04:00
|
|
|
sdir="."
|
|
|
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
|
|
|
. $sdir/common.sh
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2012-05-07 16:56:45 -04:00
|
|
|
check_pwd
|
2012-05-07 18:39:39 -04:00
|
|
|
check_input_ver_build $@
|
2012-05-05 22:58:16 -04:00
|
|
|
eval $(parse_version "$1")
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2015-02-12 15:48:59 -05:00
|
|
|
if [ -n "$rev" ]; then
|
|
|
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev"
|
|
|
|
else
|
|
|
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
|
|
|
fi
|
2012-03-23 23:44:21 -04:00
|
|
|
dst_parent="/tmp/"
|
|
|
|
dst_dir="/tmp/$dst_name"
|
2015-02-12 15:48:59 -05:00
|
|
|
release="1"
|
|
|
|
if [ $# -gt 1 ]; then
|
|
|
|
release="$2"
|
|
|
|
fi
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2012-05-09 10:10:20 -04:00
|
|
|
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
|
2012-03-23 23:44:21 -04:00
|
|
|
|
|
|
|
cd $src_repo
|
2015-02-12 15:48:59 -05:00
|
|
|
cp -a src_dist/*.spec rpmbuild/SPECS/ || true
|
2012-05-09 10:23:03 -04:00
|
|
|
cp -a src_dist/* rpmbuild/SOURCES/ || true
|
2015-02-12 15:48:59 -05:00
|
|
|
cd rpmbuild/SPECS
|
|
|
|
set_fs_release "$release"
|
|
|
|
cd ../../
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2015-02-09 13:19:31 -05:00
|
|
|
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
|
2012-03-23 23:44:21 -04:00
|
|
|
--define "_rpmdir %{_topdir}" \
|
|
|
|
--define "_srcrpmdir %{_topdir}" \
|
2015-02-12 15:48:59 -05:00
|
|
|
-ba rpmbuild/SPECS/freeswitch.spec
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2015-02-12 15:48:59 -05:00
|
|
|
mkdir -p $src_repo/RPMS
|
2012-03-23 23:44:21 -04:00
|
|
|
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
|
|
|
|
|
|
|
|
cat 1>&2 <<EOF
|
|
|
|
----------------------------------------------------------------------
|
2012-05-05 21:12:08 -04:00
|
|
|
The v$cver-$build RPMs have been rolled, now we
|
2012-03-23 23:44:21 -04:00
|
|
|
just need to push them to the YUM Repo
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
EOF
|
|
|
|
|