config-rayo.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  3. sdir="."
  4. [ -n "${0%/*}" ] && sdir="${0%/*}"
  5. . $sdir/common.sh
  6. check_pwd
  7. check_input_ver_build $@
  8. eval $(parse_version "$1")
  9. if [ -n "$rev" ]; then
  10. dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev"
  11. else
  12. dst_name="freeswitch-$cmajor.$cminor.$cmicro"
  13. fi
  14. dst_parent="/tmp/"
  15. dst_dir="/tmp/$dst_name"
  16. release="1"
  17. if [ $# -gt 1 ]; then
  18. release="$2"
  19. fi
  20. (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
  21. cd $src_repo
  22. cp -a src_dist/*.spec rpmbuild/SPECS/ || true
  23. cp -a src_dist/* rpmbuild/SOURCES/ || true
  24. cd rpmbuild/SPECS
  25. set_fs_release "$release"
  26. cd ../../
  27. rpmbuild --define "_topdir %(pwd)/rpmbuild" \
  28. --define "_rpmdir %{_topdir}" \
  29. --define "_srcrpmdir %{_topdir}" \
  30. -ba rpmbuild/SPECS/freeswitch-config-rayo.spec
  31. mkdir -p $src_repo/RPMS
  32. mv $src_repo/rpmbuild/*/freeswitch-config-rayo*.rpm $src_repo/RPMS/.
  33. cat 1>&2 <<EOF
  34. ----------------------------------------------------------------------
  35. The Rayo configuration RPMs have been rolled
  36. ----------------------------------------------------------------------
  37. EOF