]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update ru/RU sounds for 1.0.50
authorKen Rice <krice@freeswitch.org>
Fri, 12 Sep 2014 15:36:48 +0000 (19:36 +0400)
committerKen Rice <krice@freeswitch.org>
Fri, 12 Sep 2014 15:54:31 +0000 (19:54 +0400)
freeswitch-sounds-ru-RU-elena.spec
scripts/ci/sounds-ru-ru-elena.sh

index 99e913b4d36d70044a59883908c02eccbdf4b936..6563547f4ef3eb311b0bc13b6869be669e0d3797 100644 (file)
 # Determine distribution
 ##############################################################################
 
-%define is_rhel5 %(test -f /etc/redhat-release && egrep -q 'release 5' /etc/redhat-release && echo 1 || echo 0)
+#%define is_rhel5 %(test -f /etc/redhat-release && egrep -q 'release 5' /etc/redhat-release && echo 1 || echo 0)
 
 ##############################################################################
 # Set variables
 ##############################################################################
 
-%define version        %{VERSION_NUMBER}
-%define release        %{BUILD_NUMBER}
+%define version        1.0.50
+%define release        1
 
 %define fsname  freeswitch
 # you could add a version number to be more strict
@@ -76,7 +76,10 @@ Group: Applications/Communications
 Packager: Michal Bielicki <michal.bielicki@seventhsignal.de>
 URL: http://www.freeswitch.org
 Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
-BuildArch: noarch
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
+BuildA4ch: noarch
 BuildRequires: sox
 Requires: freeswitch
 Requires: freeswitch-sounds-ru-RU-elena-48000
@@ -140,25 +143,11 @@ FreeSWITCH Elena prompts package that pulls in the 8KHz, 16KHz, 32KHz and 48KHz
 ##############################################################################
 
 %prep
-%setup -b0 -q -n ru
-mkdir -p ./RU/elena
-# create buildsounds-elena.sh script in working dir
-echo  '#!/bin/bash
-
-sounds_location=$1
-for rate in 32000 16000 8000
-do 
-    for i in ascii base256 conference currency digits directory ivr misc phonetic-ascii time voicemail zrtp users
-    do
-       mkdir -p $sounds_location/$i/$rate
-       for f in `find $sounds_location/$i/48000 -name \*.wav`
-       do
-           echo "generating" $sounds_location/$i/$rate/`basename $f`
-           sox $f -r $rate $sounds_location/$i/$rate/`basename $f`
-       done
-    done
-done' > ./RU/elena/buildsounds-elena.sh
-%{__chmod} 0750 ./RU/elena/buildsounds-elena.sh
+%setup -n ru
+%setup -T -D -b 0 -n ru
+%setup -T -D -b 1 -n ru
+%setup -T -D -b 2 -n ru
+%setup -T -D -b 3 -n ru
 
 ##############################################################################
 # Build
@@ -196,18 +185,12 @@ popd
 ##############################################################################
 
 %post
-# generate the 8KHz, 16KHz and 32KHz prompts from the 48KHz ones
-cd %{SOUNDSDIR}/ru/RU/elena
-./buildsounds-elena.sh %{SOUNDSDIR}/ru/RU/elena
 
 ##############################################################################
 # Postun
 ##############################################################################
 
 %postun
-# you could check if there are sound files in 8000/ or
-# 16000/ or 32000/ and remove them *only* if the files
-# do not belong to an rpm
 
 ##############################################################################
 # Files
@@ -215,7 +198,6 @@ cd %{SOUNDSDIR}/ru/RU/elena
 
 %files
 %defattr(-,root,root)
-%attr(0750,freeswitch,daemon)          %{SOUNDSDIR}/ru/RU/elena/buildsounds-elena.sh
 
 %files -n freeswitch-sounds-ru-RU-elena-8000
 %defattr(-,root,root,-)
@@ -340,6 +322,8 @@ cd %{SOUNDSDIR}/ru/RU/elena
 ##############################################################################
 
 %changelog
+* Fri Sep 12 2014 Ken Rice <krice@freeswitch.org> - 1.0.50-1
+- created out of the spec file for elena
 * Mon Mar 06 2012 Ken Rice <krice@freeswitch.org> - 1.0.13-2
 - created out of the spec file for elena
 * Mon Jul 11 2011 Michal Bielicki <michal.bielicki@seventhsignal.de> - 1.0.13-1
index 33a4f9d00439316edabc3e57e71f1926eef93c8e..ed59dd24fbb52545ee26fb09c41ecda23e483d16 100755 (executable)
@@ -1,22 +1,30 @@
 #!/bin/sh
 ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
 
-src_repo="$(pwd)"
+basedir=$(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
 
-ver="1.0.13"
+(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
 
-build="2"
+if [ ! -d "$basedir/../freeswitch-sounds" ]; then
+        cd $basedir/..
+        git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
+else
+        cd $basedir/../freeswitch-sounds
+        git clean -fdx
+        git pull
+fi
 
-cd rpmbuild/SOURCES
+cd $basedir/../freeswitch-sounds/sounds/trunk
+./dist.pl ru/RU/elena
 
-wget http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-$ver.tar.gz
+mv freeswitch-sounds-ru-RU-elena-*.tar.gz $basedir/rpmbuild/SOURCES
 
-cd ../..
+cd $basedir
 
 rpmbuild --define "VERSION_NUMBER $ver" \
   --define "BUILD_NUMBER $build" \
@@ -25,8 +33,8 @@ rpmbuild --define "VERSION_NUMBER $ver" \
   --define "_srcrpmdir %{_topdir}" \
   -ba freeswitch-sounds-ru-RU-elena.spec
 
-mkdir $src_repo/RPMS
-mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
+mkdir $basedir/RPMS
+mv $basedir/rpmbuild/*/*.rpm $basedir/RPMS/.
 
 cat 1>&2 <<EOF
 ----------------------------------------------------------------------