asterisk/asterisk.spec

changeset 798
4ef5d37e8bb2
parent 760
bafc40b5f634
     1.1 --- a/asterisk/asterisk.spec	Mon Sep 01 21:55:47 2014 +0200
     1.2 +++ b/asterisk/asterisk.spec	Mon Sep 01 21:57:20 2014 +0200
     1.3 @@ -22,19 +22,19 @@
     1.4  ##
     1.5  
     1.6  #   package version
     1.7 -%define       V_opkg                     1.8.20.2
     1.8 -%define       V_asterisk                 1.8.20.2
     1.9 +%define       V_opkg                     1.8.30.0
    1.10 +%define       V_asterisk                 1.8.30.0
    1.11  %define       V_asterisk_fax_subdir      1.8.4
    1.12  %define       V_asterisk_fax_digium      1.8.4_1.3.1
    1.13 -%define       V_asterisk_sounds_core     1.4.23
    1.14 -%define       V_asterisk_sounds_extra    1.4.13
    1.15 +%define       V_asterisk_sounds_core     1.4.25
    1.16 +%define       V_asterisk_sounds_extra    1.4.14
    1.17  %define       V_asterisk_sounds_amoogab  1.4
    1.18  %define       V_asterisk_sounds_amootts  current
    1.19  %define       V_asterisk_sounds_custom   1.0
    1.20  %define       V_asterisk_sounds_mohop    2.03
    1.21  %define       V_asterisk_sounds_newpro   july_2012
    1.22  %define       V_asterisk_addons_mp3dec   1
    1.23 -%define       V_fswitch_sounds_en        1.0.24
    1.24 +%define       V_fswitch_sounds_en        1.0.25
    1.25  %define       V_fswitch_sounds_fr        1.0.18
    1.26  %define       V_fswitch_sounds_ru        1.0.13
    1.27  %define       V_fswitch_music            1.0.8
    1.28 @@ -52,14 +52,15 @@
    1.29  Group:        VoIP
    1.30  License:      GPL
    1.31  Version:      %{V_opkg}
    1.32 -Release:      20120800
    1.33 +Release:      20140800
    1.34  
    1.35  #   package options
    1.36  %option       with_dahdi   no
    1.37  %option       with_capi    no
    1.38  %option       with_ogg     no
    1.39  %option       with_mp3     no
    1.40 -%option       with_fax     no
    1.41 +%option       with_faxmod  no
    1.42 +%option       with_faxarch generic
    1.43  %option       with_avcodec no
    1.44  %option       with_ldap    no
    1.45  %option       with_radius  no
    1.46 @@ -123,6 +124,8 @@
    1.47  Patch2:       asterisk.patch.proxymwi
    1.48  
    1.49  #   build information
    1.50 +Prefix:       %{l_prefix}
    1.51 +BuildRoot:    %{l_buildroot}
    1.52  BuildPreReq:  OpenPKG, openpkg >= 20100101, bison, gcc, make, grep, pkgconfig
    1.53  PreReq:       OpenPKG, openpkg >= 20100101, MTA
    1.54  BuildPreReq:  zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml
    1.55 @@ -184,6 +187,8 @@
    1.56  %if "%{with_esounds}" == "yes"
    1.57  BuildPreReq:  sox, infozip
    1.58  %endif
    1.59 +AutoReq:      no
    1.60 +AutoReqProv:  no
    1.61  
    1.62  %description
    1.63      Asterisk is a complete Private Branch Exchange (PBX) in software.
    1.64 @@ -278,7 +283,7 @@
    1.65      %setup -q -n asterisk-%{V_asterisk}
    1.66      %setup -q -n asterisk-%{V_asterisk} -D -T -a 1
    1.67      %setup -q -n asterisk-%{V_asterisk} -D -T -a 2
    1.68 -%if "%{with_fax}" == "yes"
    1.69 +%if "%{with_faxmod}" == "yes"
    1.70      %setup -q -n asterisk-%{V_asterisk} -D -T -a 23
    1.71      %setup -q -n asterisk-%{V_asterisk} -D -T -a 24
    1.72  %endif
    1.73 @@ -311,7 +316,8 @@
    1.74          -e 's;lua5\.1;lua;g' \
    1.75          -e 's;-I${IMAP_TK_DIR}/c-client;-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap;g' \
    1.76          -e 's;${IMAP_TK_DIR}/c-client/c-client\.a;-limap -lssl -lcrypto -lcrypt;g' \
    1.77 -        -e 's;LIBXML2_INCLUDE="-I\${LIBXML2_DIR}/include";echo "Removing really buggy hard coded LibXML include defs.";' \
    1.78 +        -e 's;LIBXML2_INCLUDE=\$(echo \${LIBXML2_INCLUDE} | \$SED -e "s|-I|-I\${LIBXML2_DIR}|g");echo "Removing really buggy hard coded LibXML include defs.";' \
    1.79 +        -e 's;LIBXML2_LIB=\$(echo \${LIBXML2_LIB} | \$SED -e "s|-L|-L\${LIBXML2_DIR}|g");echo "Removing really buggy hard coded LibXML linkage defs.";' \
    1.80          -e 's;\(for ver in 2\.0 2\.2 2\.4\);\1 2.6;' \
    1.81          -e 's;\(\-lpq.*\-lz.*\)";\1 ${PTHREAD_LIBS}";g'\
    1.82          configure
    1.83 @@ -397,6 +403,13 @@
    1.84      %{l_shtool} subst \
    1.85          -e 's;#ifdef CC_AST_HAS_VERSION_1_6$;#if (defined(CC_AST_HAS_VERSION_1_6) \&\& !defined(CC_AST_HAS_VERSION_1_8));g' \
    1.86          chan_capi-%{V_chan_capi}/chan_capi_devstate.c
    1.87 +    %{l_shtool} subst \
    1.88 +        -e "s;^\(NCURSES_INCLUDE=\).*;\1%{l_cppflags ncurses};" \
    1.89 +        -e "s;^\(NCURSES_LIB=\);\1%{l_ldflags} ;" \
    1.90 +        menuselect/makeopts.in
    1.91 +    %{l_shtool} subst \
    1.92 +        -e 's; *\.lastclean;;g' \
    1.93 +        Makefile
    1.94      case "%{l_platform -t}" in
    1.95          *-sunos* )
    1.96              %{l_shtool} subst \
    1.97 @@ -619,6 +632,9 @@
    1.98  %endif
    1.99  
   1.100  %install
   1.101 +    #   remove build cruft
   1.102 +    rm -rf $RPM_BUILD_ROOT
   1.103 +
   1.104      #   install program
   1.105      %{l_make} %{l_mflags} install \
   1.106          DESTDIR=$RPM_BUILD_ROOT \
   1.107 @@ -634,7 +650,7 @@
   1.108      ) || exit $?
   1.109  %endif
   1.110  
   1.111 -%if "%{with_fax}" == "yes"
   1.112 +%if "%{with_faxmod}" == "yes"
   1.113      #   install fax support
   1.114      case "%{l_platform -t}" in
   1.115          amd64*-* )
   1.116 @@ -713,7 +729,7 @@
   1.117        cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk
   1.118        for highfile in `find . -name '*.wav'`; do
   1.119            lowfile=`echo $highfile | sed -e 's;\(.*\)\.wav;\1.sln16;'`
   1.120 -          %{l_prefix}/bin/sox $highfile -t raw -r 16000 -s -2 -c 1 $lowfile
   1.121 +          %{l_prefix}/bin/sox $highfile -t raw -r 16000 -e signed-integer -b 16 -c 1 $lowfile
   1.122            rm $highfile
   1.123        done
   1.124  %endif
   1.125 @@ -857,6 +873,7 @@
   1.126  %files -f files
   1.127  
   1.128  %clean
   1.129 +    rm -rf $RPM_BUILD_ROOT
   1.130  
   1.131  %post
   1.132  %if "%{with_dahdi}" == "yes"
   1.133 @@ -893,7 +910,7 @@
   1.134          ) || exit $?
   1.135      fi
   1.136  %endif
   1.137 -%if "%{with_fax}" == "yes"
   1.138 +%if "%{with_faxmod}" == "yes"
   1.139      ( echo "Asterisk has been installed with proprietary Digium fax support."
   1.140        echo "The responsible module is called res_fax_digium and requires a"
   1.141        echo "valid license. The license must be found in the directory"

mercurial