# TODO: # - cgi-bin package - separate, because of suid-root # - separate plugins into packages # - use shared versions of lpc10, gsm,... # - put chan_h323 into separate package and make obsoletes to chan_oh323 from external spec # These two h323 plugin are conflicting... %define _snap 20030520 Summary: Asterisk PBX Summary(pl): Centralka (PBX) Asterisk Name: asterisk Version: 0.4.0.%{_snap} Release: 0.1 License: GPL v2 Group: Applications/System #Source0: ftp://ftp.asterisk.org/pub/telephony/asterisk/%{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.bz2 # Source0-md5: a6cdb08e4201bed9457053d20f6923da Source1: %{name}.init Source2: %{name}.sysconfig Patch0: %{name}-Makefile.patch # It's included, but these sources are broken by me :) # will fit on clean cvs source #Patch1: %{name}-DESTDIR.patch URL: http://www.asteriskpbx.com/ BuildRequires: bison BuildRequires: gawk BuildRequires: glib-devel BuildRequires: gtk+-devel BuildRequires: mysql-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: speex-devel BuildRequires: zlib-devel # These libraries are crazy... # With openh323 1.11.7 and pwlib 1.4.11 i had sig11 BuildRequires: openh323-devel = 1.10.4 BuildRequires: pwlib-devel = 1.4.4 PreReq: rc-scripts Requires(post,preun): /sbin/chkconfig %requires_eq openh323 %requires_eq pwlib BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Asterisk is an Open Source PBX and telephony development platform that can both replace a conventional PBX and act as a platform for developing custom telephony applications for delivering dynamic content over a telephone similarly to how one can deliver dynamic content through a web browser using CGI and a web server. Asterisk talks to a variety of telephony hardware including BRI, PRI, POTS, and IP telephony clients using the Inter-Asterisk eXchange protocol (e.g. gnophone or miniphone). For more information and a current list of supported hardware, see http://www.asteriskpbx.com/. %description -l pl Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako platforma do rozwijania własnych aplikacji telefonicznych do przekazywania dynamicznej treści przez telefon, podobnie jak można przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i serwera WWW. Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI, PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk eXchange (np. gnophone lub miniphone). Więcej informacji i listę obsługiwanego sprzętu można znaleźć pod http://www.asteriskpbx.com/. %package devel Summary: Header files for Asterisk platform Summary(pl): Pliki nagłówkowe platformy Asterisk Group: Development Requires: %{name} = %{version} %description devel Header files for Asterisk development platform. %description devel -l pl Pliki nagłówkowe platformy programistycznej Asterisk. %prep %setup -q -n %{name} %patch0 -p1 #%patch1 -p1 %build %{__make} # H323 plugin: cd channels/h323/ %{__make} \ PWLIBDIR="/usr" \ OPENH323DIR="/usr" cd ../../ # it requires doxygen - I don't know if we should do this... #%{__make} progdocs %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_PREFIX=$RPM_BUILD_ROOT %{__make} samples \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_PREFIX=$RPM_BUILD_ROOT cd channels/h323/ %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_PREFIX=$RPM_BUILD_ROOT %{__make} samples \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_PREFIX=$RPM_BUILD_ROOT cd ../../ install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add asterisk if [ -f /var/lock/subsys/asterisk ]; then /etc/rc.d/init.d/asterisk restart 1>&2 else echo "Run \"/etc/rc.d/init.d/asterisk start\" to start Asterisk daemon." fi %preun if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/asterisk ]; then /etc/rc.d/init.d/asterisk stop 1>&2 fi /sbin/chkconfig --del asterisk fi %files %defattr(644,root,root,755) %doc BUGS ChangeLog CREDITS HARDWARE README* SECURITY configs doc/{*.txt,linkedlists.README} %attr(755,root,root) %{_sbindir}/* %dir %{_sysconfdir}/asterisk %attr(750,root,root) %{_sysconfdir}/rc.d/init.d/%{name} %attr(640,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(640,root,root) %config(noreplace) %{_sysconfdir}/asterisk/*.conf %attr(640,root,root) %config(noreplace) %{_sysconfdir}/asterisk/*.adsi %dir %{_libdir}/asterisk %dir %{_libdir}/asterisk/modules %attr(755,root,root) %{_libdir}/asterisk/modules/*.so %dir /var/lib/asterisk %dir /var/lib/asterisk/agi-bin %dir /var/lib/asterisk/images %dir /var/lib/asterisk/keys %dir /var/lib/asterisk/mohmp3 %dir /var/lib/asterisk/sounds %dir /var/lib/asterisk/sounds/digits /var/lib/asterisk/images/*.jpg /var/lib/asterisk/keys/*.pub /var/lib/asterisk/sounds/*.gsm /var/lib/asterisk/sounds/digits/*.gsm %dir /var/spool/asterisk %dir /var/spool/asterisk/monitor %dir /var/spool/asterisk/vm %dir /var/spool/asterisk/voicemail %dir /var/spool/asterisk/voicemail/default %dir /var/log/asterisk %dir /var/log/asterisk/cdr-csv # RedHat specific init script file #%attr(754,root,root) /etc/rc.d/init.d/asterisk #%dir /var/lib/asterisk/agi-bin/* %files devel %defattr(644,root,root,755) %dir %{_includedir}/asterisk %{_includedir}/asterisk/*.h