FS-11567: [Build-System] CentOS packaging: Put version parser into spec files.
This commit is contained in:
parent
2fb5a3938f
commit
efd35f682e
|
@ -28,7 +28,8 @@
|
||||||
#
|
#
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
|
|
||||||
%define version 1.7.0
|
%define nonparsedversion 1.7.0
|
||||||
|
%define version %(echo '%{nonparsedversion}' | sed 's/-//g')
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
%define fsname freeswitch
|
%define fsname freeswitch
|
||||||
|
@ -74,7 +75,7 @@ Summary: Rayo configuration for the FreeSWITCH Open Source telephone platform.
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Packager: Chris Rienzo
|
Packager: Chris Rienzo
|
||||||
URL: http://www.freeswitch.org/
|
URL: http://www.freeswitch.org/
|
||||||
Source0: freeswitch-%{version}.tar.bz2
|
Source0: freeswitch-%{nonparsedversion}.tar.bz2
|
||||||
Requires: freeswitch
|
Requires: freeswitch
|
||||||
Requires: freeswitch-application-conference
|
Requires: freeswitch-application-conference
|
||||||
Requires: freeswitch-application-esf
|
Requires: freeswitch-application-esf
|
||||||
|
@ -103,7 +104,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
FreeSWITCH rayo server implementation.
|
FreeSWITCH rayo server implementation.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -b0 -q -n freeswitch-%{version}
|
%setup -b0 -q -n freeswitch-%{nonparsedversion}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,8 @@
|
||||||
%{?with_mod_shout:%define build_mod_shout 1 }
|
%{?with_mod_shout:%define build_mod_shout 1 }
|
||||||
%{?with_mod_opusfile:%define build_mod_opusfile 1 }
|
%{?with_mod_opusfile:%define build_mod_opusfile 1 }
|
||||||
|
|
||||||
%define version 1.7.0
|
%define nonparsedversion 1.7.0
|
||||||
|
%define version %(echo '%{nonparsedversion}' | sed 's/-//g')
|
||||||
%define release 1
|
%define release 1
|
||||||
|
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
|
@ -118,7 +119,7 @@ Vendor: http://www.freeswitch.org/
|
||||||
# Source files and where to get them
|
# Source files and where to get them
|
||||||
#
|
#
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
Source0: http://files.freeswitch.org/%{name}-%{version}.tar.bz2
|
Source0: http://files.freeswitch.org/%{name}-%{nonparsedversion}.tar.bz2
|
||||||
Source1: http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
|
Source1: http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
|
||||||
Source2: http://files.freeswitch.org/downloads/libs/mongo-c-driver-1.1.0.tar.gz
|
Source2: http://files.freeswitch.org/downloads/libs/mongo-c-driver-1.1.0.tar.gz
|
||||||
Source3: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
|
Source3: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
|
||||||
|
@ -1430,7 +1431,7 @@ Basic vanilla config set for the FreeSWITCH Open Source telephone platform.
|
||||||
######################################################################################################################
|
######################################################################################################################
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -b0 -q
|
%setup -b0 -q -n %{name}-%{nonparsedversion}
|
||||||
cp %{SOURCE1} libs/
|
cp %{SOURCE1} libs/
|
||||||
cp %{SOURCE2} libs/
|
cp %{SOURCE2} libs/
|
||||||
cp %{SOURCE3} libs/
|
cp %{SOURCE3} libs/
|
||||||
|
|
|
@ -123,11 +123,11 @@ set_fs_ver () {
|
||||||
rpm_version="$major.$minor.$micro"
|
rpm_version="$major.$minor.$micro"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -e "s|\(%define version \).*|\1$rpm_version|" \
|
sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|" \
|
||||||
freeswitch.spec > freeswitch.spec.$$
|
freeswitch.spec > freeswitch.spec.$$
|
||||||
mv freeswitch.spec.$$ freeswitch.spec
|
mv freeswitch.spec.$$ freeswitch.spec
|
||||||
|
|
||||||
sed -e "s|\(%define version \).*|\1$rpm_version|" \
|
sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|" \
|
||||||
freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
|
freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
|
||||||
mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
|
mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue