Search
j0ke.net Open Build Service
>
Projects
>
server:telephony
>
asterisk18
> asterisk.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File asterisk.spec of Package asterisk18 (Revision 17)
Currently displaying revision
17
,
show latest
# # spec file for package asterisk18 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define origname asterisk Name: asterisk18 Version: 1.8.11.0 Release: 0 Group: Productivity/Telephony/Servers URL: http://asterisk.org/ Summary: The Asterisk Open Source PBX License: BSD and BSD-like, GPL Source: asterisk-%version.tar.xz Source1: asterisk-extra-sounds-en-gsm-1.4.11.tar.gz Source2: asterisk-extra-sounds-en-gsm-1.4.11.tar.gz.sha1 Source3: asterisk-moh-opsound-wav-2.03.tar.gz.sha1 Source5: mp3.tar.bz2 Patch1: asterisk-init.diff #Patch2: asterisk-configure-paths.diff %if 0%{?suse_version} >= 1200 Patch3: asterisk-rundir.diff %endif Patch4: asterisk-deps.diff BuildRoot: %_tmppath/%name-%version-build BuildRequires: autoconf >= 2.60, automake >= 1.9, bison, dahdi-linux-devel BuildRequires: flex, gcc-c++ BuildRequires: graphviz, imap-devel, libgsm-devel, libmysqlclient-devel %if 0%{?suse_version} > 1110 %define with_ais 1 #openais = BuildRequires: pkgconfig(SaClm) (with 1210+) BuildRequires: libopenais-devel %endif BuildRequires: libpri-devel, libss7-devel, libtool BuildRequires: libtonezone-devel, mISDNuser-devel, ncurses-devel BuildRequires: net-snmp-devel, openldap2-devel #BuildRequires: openr2-devel #BuildRequires: openh323-devel # ast does not build # It seems to also want the CLI interface of openssl BuildRequires: openssl #BuildRequires: osp-toolkit-devel BuildRequires: pkgconfig %if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(alsa), pkgconfig(bluez), pkgconfig(libcrypto) %else BuildRequires: alsa-devel, bluez-devel, libopenssl-devel %endif %if 0%{?suse_version} == 1140 BuildRequires: pkgconfig(gmime-2.0) %endif %if 0%{?suse_version} == 1210 BuildRequires: pkgconfig(gmime-2.4) %endif %if 0%{?suse_version} < 1140 BuildRequires: gmime-devel %endif %if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(gtk+-2.0), pkgconfig(iksemel), pkgconfig(jack) BuildRequires: pkgconfig(libcurl), pkgconfig(libical), pkgconfig(libiodbc) BuildRequires: pkgconfig(libnewt), pkgconfig(libusb), pkgconfig(libxml-2.0) BuildRequires: pkgconfig(lua) %else BuildRequires: gtk2-devel, iksemel-devel, libjack-devel BuildRequires: curl-devel, libical-devel, unixODBC-devel BuildRequires: newt-devel, libusb-devel, libxml2-devel, lua-devel %endif %if 0%{?suse_version} >= 1140 BuildRequires: pkgconfig(neon) %else BuildRequires: neon-devel %endif %if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(ogg), pkgconfig(openssl), pkgconfig(portaudio-2.0) BuildRequires: pkgconfig(sdl), pkgconfig(SDL_image), pkgconfig(spandsp) BuildRequires: pkgconfig(speex), pkgconfig(speexdsp), pkgconfig(sqlite3) BuildRequires: pkgconfig(vorbis), pkgconfig(x11) %else BuildRequires: libogg-devel, libopenssl-devel, portaudio-devel BuildRequires: SDL-devel, SDL_image-devel, spandsp-devel BuildRequires: speex-devel, sqlite3-devel BuildRequires: libvorbis-devel, xorg-x11-devel %endif %if 0%{?suse_version} >= 1140 BuildRequires: pkgconfig(zlib) %else BuildRequires: zlib-devel %endif BuildRequires: popt-devel, postgresql-devel, pwlib-devel %if %{defined build_radius} BuildRequires: radiusclient-ng-devel %endif %if 0%{?suse_version} >= 1140 BuildRequires: rubber %endif BuildRequires: sqlite2-devel, termcap, texlive, xz #BuildRequires: srtp-devel Requires(pre): pwdutils # addons are included in main package since 1.8.x Provides: asterisk18-addons = %version-%release %if "%{?_initddir}" == "" %define _initddir %_initrddir %endif %define scdperm %%attr(0751,root,asterisk) %%verify(not mode) %define scfperm %%attr(0640,root,asterisk) %%verify(not mode) %%config(noreplace) %description Asterisk is a complete PBX in software. It provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. Asterisk provides voicemail services with directory, call conferencing, interactive voice response, and call queuing. It has support for three-way calling, caller ID services, ADSI, SIP, and H.323 (as both client and gateway). Documentation is available on the Asterisk home page (http://asterisk.org) and on the Asterisk wiki (http://voip-info.org/wiki-Asterisk). %package ais Summary: OpenAIS/Corosync module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description ais %package alsa Summary: Soundcard module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description alsa This package allows Asterisk to use a soundcard supported by ALSA as a telephone. %package calendar Summary: Calendar resource modules for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description calendar %package console Summary: Console channel module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description console %package dahdi Summary: Telephony Hardware Module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description dahdi This module allows Asterisk to use telephony hardware that is supported by the dahdi kernel drivers. Supported hardware ranges from FXO and FXS cards over ISDN BRI cards to T1, and E1 cards with up to four interfaces. See the dahdi package for details. %package devel Summary: Development files for Asterisk Group: Development/Libraries/C and C++ Requires: asterisk18 = %version %description devel This package contains the header files and libraries necessary for developing applications which use asterisk. Install asterisk-devel if you want to develop applications which depend on asterisk. %package h323 Summary: Voice over IP Module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description h323 This package adds support for the H.323 voice over IP (VoIP) protocol to Asterisk. Support for the SIP and IAX2 protocols is included in the asterisk base package. %package moh-base Summary: MOH audio files for Asterisk Group: Productivity/Telephony/Servers %if 0%{?suse_version} >= 1130 BuildArch: noarch %endif %description moh-base %package odbc Summary: Database Module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description odbc This package allows Asterisk to use read configuration data from, and write call logs to ODBC databases. %package pgsql Summary: Database Module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description pgsql This package allows Asterisk to use read configuration data from, and write call logs to PostgreSQL databases. %if %{defined build_radius} %package radius Summary: Radius modules for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description radius %endif %package snmp Summary: SNMP resource module for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description snmp %package sounds-base Summary: Sound files for Asterisk Group: Productivity/Telephony/Servers %if 0%{?suse_version} >= 1130 BuildArch: noarch %endif %description sounds-base %package spandsp Summary: SpanDSP plugin for Asterisk Group: Productivity/Telephony/Servers Requires: asterisk18 = %version %description spandsp %prep %if 0%{?__xz:1} %setup -q -n asterisk-%{version} %else tar -xf "%{S:0}" --use=xz; %setup -DTq -n asterisk-%{version} %endif %patch1 -p1 ## patch2 -p1 %patch4 -p1 %if 0%{?suse_version} >= 1200 %patch3 -p1 %endif cp %{S:1} $RPM_BUILD_DIR/%origname-%{version}/sounds/ cp %{S:2} $RPM_BUILD_DIR/%origname-%{version}/sounds/ cp %{S:3} $RPM_BUILD_DIR/%origname-%{version}/sounds/ tar -C addons -xjf %{S:5} %build ./bootstrap.sh %configure export CFLAGS="%optflags" make menuselect.makeopts; echo "MENUSELECT_EXTRA_SOUNDS=EXTRA-SOUNDS-EN-GSM" >> menuselect.makeopts echo "MENUSELECT_ADDONS=chan_mobile format_mp3 res_config_mysql app_mysql app_saycontrol cdr_mysql" >> menuselect.makeopts echo "MENUSELECT_UTILS=astcanary aelparse check_expr check_expr2 conf2ael hashtest hashtest2 muted refcounter stereorize streamplayer" >> menuselect.makeopts echo "MENUSELECT_AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi" >> menuselect.makeopts # Force generation of BUILT_SOURCES-like files because asterisk can't get # their act together. make %{?_smp_mflags}; %install b="%buildroot"; make install DESTDIR="$b" DOWNLOAD="/bin/true"; make samples DESTDIR="$b"; echo "################################ ADDONS ####################################" ls -al addons echo "################################ ADDONS ####################################" ls -al %{buildroot}%{_libdir}/asterisk/modules/ echo "################################ ADDONS ####################################" install -pm0644 include/asterisk.h "$b/%_includedir/"; install -Dpm0755 contrib/init.d/rc.suse.asterisk "$b/%_initddir/asterisk"; ln -sf %_initddir/asterisk "$b/%_sbindir/rcasterisk"; #mkdir -p "$b/%_localstatedir/lib/asterisk"; #mv "$b/%_datadir/asterisk/phoneprov" "$b/%_localstatedir/lib/asterisk/"; #ln -s "%_localstatedir/lib/asterisk/phoneprov" "$b/%_datadir/asterisk/"; %if !0%{?with_ais} rm -f "$b/%_sysconfdir/asterisk/ais.conf"; %endif fl_asterisk="$PWD/asterisk.files"; >"$fl_asterisk"; pushd "%buildroot/%_sysconfdir/asterisk/"; for i in *; do case "$i" in (ais.conf|alsa.conf|calendar.conf|console.conf) :;; (voicemail.conf) :;; (*_odbc.conf|*_pgsql.conf|*_snmp.conf) :;; (*) echo "%scfperm %_sysconfdir/asterisk/$i" >>"$fl_asterisk";; esac; done; popd; pushd "%buildroot/%_libdir/asterisk/modules/"; for i in *; do case "$i" in (*_ais.so|*_alsa.so|*_calendar*.so|*_console.so|*_dahdi*.so) :;; (*_odbc.so|*_pgsql.so|*_radius.so|*_snmp.so|*_spandsp.so) :;; (*_zapateller.so) :;; (*) echo "%_libdir/asterisk/modules/$i" >>"$fl_asterisk";; esac; done; popd; mkdir -p %{buildroot}%_localstatedir/lib/asterisk/agi-bin %pre %_bindir/getent group asterisk >/dev/null || \ %_sbindir/groupadd -r asterisk || :; %_bindir/getent passwd asterisk >/dev/null || \ %_sbindir/useradd -r -s /sbin/false -d /var/lib/asterisk \ -M -c "Asterisk PBX" -g asterisk asterisk || :; %post #/sbin/chkconfig --add asterisk mkdir -p -m 0775 /var/run/asterisk chown -R asterisk:asterisk /var/run/asterisk db="%_localstatedir/lib/asterisk/astdb"; if [ ! -e "$db" ]; then touch "$db"; chmod 0640 "$db"; chown asterisk:asterisk "$db"; fi; # activate to be run by asterisk-user/group sed -i 's/^;runuser/runuser/' %_sysconfdir/asterisk/asterisk.conf sed -i 's/^;rungroup/rungroup/' %_sysconfdir/asterisk/asterisk.conf # activate languageprefix (needed by sounds package) sed -i 's/^;languageprefix/languageprefix/' %_sysconfdir/asterisk/asterisk.conf # create symlinks %preun %stop_on_removal asterisk %postun %insserv_cleanup %files -f asterisk.files %defattr(-,root,root) %doc BUGS CHANGES ChangeLog COPYING CREDITS doc/* configs LICENSE sample.call *.txt %scdperm %dir %_sysconfdir/asterisk %attr(0640,asterisk,asterisk) %verify(not mode) %config(noreplace) %_sysconfdir/asterisk/voicemail.conf %_initddir/asterisk %_sbindir/astcanary %_sbindir/asterisk %_sbindir/astgenkey %_sbindir/autosupport %_sbindir/rasterisk %_sbindir/rcasterisk %_sbindir/safe_asterisk %_sbindir/aelparse %_sbindir/check_expr %_sbindir/check_expr2 %_sbindir/conf2ael %_sbindir/hashtest %_sbindir/hashtest2 %_sbindir/muted %_sbindir/refcounter %_sbindir/stereorize %_sbindir/streamplayer %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %dir %_localstatedir/lib/asterisk %_localstatedir/lib/asterisk/documentation %_localstatedir/lib/asterisk/firmware %_localstatedir/lib/asterisk/images %_localstatedir/lib/asterisk/phoneprov %_localstatedir/lib/asterisk/static-http %_localstatedir/lib/asterisk/agi-bin %attr(0750,asterisk,asterisk) %_localstatedir/spool/asterisk %attr(0750,asterisk,asterisk) %dir %_localstatedir/log/asterisk %_mandir/man8/* %if 0%{?with_ais} %files ais %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/ais.conf %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_ais.so %endif %files alsa %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/alsa.conf %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_alsa.so %files calendar %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/calendar.conf %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_calendar*.so %files console %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/console.conf %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_console.so %files dahdi %defattr(-,root,root) %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_zap* %_libdir/asterisk/modules/*_dahdi* %files devel %defattr(-,root,root) %_includedir/asterisk* %files moh-base %defattr(-,root,root) %dir %_localstatedir/lib/asterisk %_localstatedir/lib/asterisk/moh %files odbc %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/*odbc* %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_odbc.so %files pgsql %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/*pgsql* %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_pgsql.so %files sounds-base %defattr(-,root,root) %dir %_localstatedir/lib/asterisk %_localstatedir/lib/asterisk/sounds %if %{defined build_radius} %files radius %defattr(-,root,root) %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_radius.so %endif %files snmp %defattr(-,root,root) %scdperm %dir %_sysconfdir/asterisk %scfperm %_sysconfdir/asterisk/*_snmp.conf %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_snmp.so %files spandsp %defattr(-,root,root) %dir %_libdir/asterisk %dir %_libdir/asterisk/modules %_libdir/asterisk/modules/*_spandsp.so %changelog