2012-05-06 03:24:46 +00:00
|
|
|
#!/bin/sh
|
2012-03-24 03:44:21 +00:00
|
|
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
|
|
|
|
|
|
|
src_repo="$(pwd)"
|
|
|
|
|
|
|
|
if [ ! -d .git ]; then
|
|
|
|
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "usage: ./scripts/ci/extras/erlangbuilder.sh" 1>&2
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2012-05-09 14:10:20 +00:00
|
|
|
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SOURCES SPECS)
|
2012-03-24 03:44:21 +00:00
|
|
|
cd $src_repo
|
|
|
|
|
|
|
|
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
|
|
|
|
--define "_rpmdir %{_topdir}" \
|
|
|
|
--define "_srcrpmdir %{_topdir}" \
|
|
|
|
-ba erlang.spec
|
|
|
|
|
|
|
|
mkdir $src_repo/RPMS
|
|
|
|
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
|
|
|
|
|