2
0

sounds-en-us-callie.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. build="$2"
  10. basedir=$(pwd);
  11. (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
  12. if [ ! -d "$basedir/../freeswitch-sounds" ]; then
  13. cd $basedir/..
  14. git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
  15. else
  16. cd $basedir/../freeswitch-sounds
  17. git clean -fdx
  18. git pull
  19. fi
  20. cd $basedir/../freeswitch-sounds/sounds/trunk
  21. ./dist.pl en/us/callie
  22. mv freeswitch-sounds-en-us-callie-*.tar.gz $basedir/rpmbuild/SOURCES
  23. cd $basedir
  24. rpmbuild --define "VERSION_NUMBER $ver" \
  25. --define "BUILD_NUMBER 1" \
  26. --define "_topdir %(pwd)/rpmbuild" \
  27. --define "_rpmdir %{_topdir}" \
  28. --define "_srcrpmdir %{_topdir}" \
  29. -ba freeswitch-sounds-en-us-callie.spec
  30. mkdir $src_repo/RPMS
  31. mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
  32. cat 1>&2 <<EOF
  33. ----------------------------------------------------------------------
  34. The Sound RPMs have been rolled
  35. ----------------------------------------------------------------------
  36. EOF