OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 14-Oct-2006 08:54:25
Branch: HEAD Handle: 2006101407542500
Modified files:
openpkg-src/asterisk asterisk.spec
Log:
make mpg123 dependency an optional one
Summary:
Revision Changes Path
1.24 +16 -9 openpkg-src/asterisk/asterisk.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk/asterisk.spec
============================================================================
$ cvs diff -u -r1.23 -r1.24 asterisk.spec
--- openpkg-src/asterisk/asterisk.spec 13 Oct 2006 20:59:19 -0000
1.23
+++ openpkg-src/asterisk/asterisk.spec 14 Oct 2006 06:54:25 -0000
1.24
@@ -40,10 +40,11 @@
Group: VoIP
License: GPL
Version: %{V_asterisk}
-Release: 20061013
+Release: 20061014
# package options
%option with_zaptel no
+%option with_mp3 no
# list of sources
Source0:
ftp://ftp.digium.com/pub/asterisk/releases/asterisk-%{V_asterisk}.tar.gz
@@ -59,11 +60,14 @@
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130, bison, gcc, make
-PreReq: OpenPKG, openpkg >= 20040130, mpg123
+PreReq: OpenPKG, openpkg >= 20040130
BuildPreReq: zlib, curl, openssl, ncurses, speex
PreReq: zlib, curl, openssl, ncurses, speex
BuildPreReq: perl, perl-openpkg
PreReq: perl
+%if "%{with_mp3}" == "yes"
+PreReq: mpg123
+%endif
AutoReq: no
AutoReqProv: no
@@ -114,14 +118,15 @@
%setup -q -D -T -a 3
%setup -q -D -T -a 4
%patch -p0
+%if "%{with_mp3}" == "yes"
+ mpg123="%{l_prefix}/bin/mpg123"
+%else
+ mpg123="`which false`"
+%endif
%{l_shtool} subst \
- -e 's;/usr/local/bin/mpg123;%{l_prefix}/bin/mpg123;' \
- -e 's;/usr/bin/mpg123;%{l_prefix}/bin/mpg123;' \
- res/res_musiconhold.c
- %{l_shtool} subst \
- -e 's;/usr/local/bin/mpg123;%{l_prefix}/bin/mpg123;' \
- -e 's;/usr/bin/mpg123;%{l_prefix}/bin/mpg123;' \
- apps/app_mp3.c
+ -e "s;/usr/local/bin/mpg123;$mpg123;" \
+ -e "s;/usr/bin/mpg123;$mpg123;" \
+ res/res_musiconhold.c apps/app_mp3.c
%build
# sanity check
@@ -173,8 +178,10 @@
ASTVARLIBDIR=%{l_prefix}/share/asterisk \
INSTALL="%{l_shtool} install -c"
) || exit $?
+%if "%{with_mp3}" == "yes"
%{l_shtool} install -c -m 644 %{l_value -s -a} \
sounds/*.mp3 $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/mohmp3/
+%endif
# install addon modules
( cd app_conference
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]