erlang-rpm.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  3. src_repo="$(pwd)"
  4. if [ ! -d .git ]; then
  5. echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
  6. exit 1;
  7. fi
  8. ver="R14B"
  9. rel="03"
  10. cd rpmbuild/SOURCES
  11. wget http://www.erlang.org/download/otp_src_R14B03.tar.gz
  12. wget http://www.erlang.org/download/otp_doc_html_R14B03.tar.gz
  13. wget http://www.erlang.org/download/otp_doc_man_R14B03.tar.gz
  14. cp ../../scripts/ci/extras/otp-R14B-00-0001-Do-not-format-man-pages.patch .
  15. cd ../..
  16. cp scripts/ci/extras/erlang.spec .
  17. rpmbuild --define "VERSION_NUMBER $ver" \
  18. --define "RELEASE_NUMBER $rel" \
  19. --define "_topdir %(pwd)/rpmbuild" \
  20. --define "_rpmdir %{_topdir}" \
  21. --define "_srcrpmdir %{_topdir}" \
  22. -ba erlang.spec
  23. mkdir $src_repo/RPMS
  24. mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
  25. cat 1>&2 <<EOF
  26. ----------------------------------------------------------------------
  27. The Erlang RPM has been rolled
  28. ----------------------------------------------------------------------
  29. EOF