Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
688f2252
提交
688f2252
authored
9月 12, 2014
作者:
Ken Rice
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update ru/RU sounds for 1.0.50
上级
ef9553ab
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
30 行增加
和
38 行删除
+30
-38
freeswitch-sounds-ru-RU-elena.spec
freeswitch-sounds-ru-RU-elena.spec
+14
-30
sounds-ru-ru-elena.sh
scripts/ci/sounds-ru-ru-elena.sh
+16
-8
没有找到文件。
freeswitch-sounds-ru-RU-elena.spec
浏览文件 @
688f2252
...
...
@@ -14,14 +14,14 @@
# 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
...
...
scripts/ci/sounds-ru-ru-elena.sh
浏览文件 @
688f2252
#!/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
----------------------------------------------------------------------
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论