rpmbuilder.sh 736 B

12345678910111213141516171819202122232425262728
  1. dst_parent="/tmp/"
  2. dst_dir="/tmp/$dst_name"
  3. #!/bin/sh
  4. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  5. sdir="."
  6. [ -n "${0%/*}" ] && sdir="${0%/*}"
  7. dst_name="freeswitch-release"
  8. (mkdir -p temp && cd temp && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
  9. cp -a * temp/SOURCES/ || true
  10. rpmbuild --define "_topdir %(pwd)/temp" \
  11. --define "_rpmdir %{_topdir}" \
  12. --define "_srcrpmdir %{_topdir}" \
  13. -ba freeswitch-release.spec
  14. mkdir ./RPMS
  15. mv ./temp/*/*.rpm ./RPMS/.
  16. cat 1>&2 <<EOF
  17. ----------------------------------------------------------------------
  18. The Repo RPM has been rolled, now we
  19. just need to push to the web server
  20. ----------------------------------------------------------------------
  21. EOF