# to add a distro release tag run rpmbuild --define 'dist value' # to suppress auto dependencies run rpmbuild --define 'nodeps 1' # to disable PSTN card drivers run rpmbuild --define 'nopstn 1' # to disable the GUI clients run rpmbuild --define 'nogui 1' %{!?dist:%define dist %{nil}} %{?nodeps:%define no_auto_deps 1} %{?nopstn:%define no_pstn 1} %{?nogui:%define no_gui 1} %if "%{dist}" == "" %define dist %(test -f /etc/mandriva-release && echo mdv) %endif %if "%{dist}" == "" %define dist %(test -f /etc/mandrake-release && echo mdk) %endif %if "%{dist}" == "" %define dist %(test -f /etc/fedora-release && echo fc) %endif %if "%{dist}" == "" %define dist %(test -f /etc/redhat-release && echo rh) %endif %if "%{dist}" == "" %define dist %(test -f /etc/SuSE-release && echo suse) %endif %if "%{dist}" == "none" %define dist %{nil} %endif Summary: Yet Another Telephony Engine Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: @PACKAGE_STATUS@@PACKAGE_RELEASE@%{dist} License: GPL Packager: Paul Chitescu Source: http://yate.null.ro/%{name}-%{version}-@PACKAGE_STATUS@@PACKAGE_RELEASE@.tar.gz Group: Applications/Communications BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://yate.null.ro/ BuildRequires: gcc-c++ %define prefix /usr %description Yate is a telephony engine designed to implement PBX and IVR solutions for small to large scale projects. %files %defattr(-, root, root) %dir %{_defaultdocdir}/yate-%{version} %doc %{_defaultdocdir}/yate-%{version}/README %doc %{_defaultdocdir}/yate-%{version}/COPYING %doc %{_defaultdocdir}/yate-%{version}/ChangeLog %{_libdir}/lib*.so.* %{_bindir}/yate %{_mandir}/*/yate.* %{_initrddir}/yate %dir %{_libdir}/yate %{_libdir}/yate/cdrbuild.yate %{_libdir}/yate/cdrfile.yate %{_libdir}/yate/regexroute.yate %{_libdir}/yate/server/regfile.yate %{_libdir}/yate/server/accfile.yate %{_libdir}/yate/server/register.yate %{_libdir}/yate/tonegen.yate %{_libdir}/yate/tonedetect.yate %{_libdir}/yate/wavefile.yate %{_libdir}/yate/conference.yate %{_libdir}/yate/moh.yate %{_libdir}/yate/callgen.yate %{_libdir}/yate/analyzer.yate %{_libdir}/yate/rmanager.yate %{_libdir}/yate/msgsniff.yate %{_libdir}/yate/mux.yate %{_libdir}/yate/pbx.yate %{_libdir}/yate/server/dbpbx.yate %{_libdir}/yate/server/pbxassist.yate %{_libdir}/yate/server/park.yate %{_libdir}/yate/server/queues.yate %{_libdir}/yate/server/lateroute.yate %{_libdir}/yate/dumbchan.yate %{_libdir}/yate/callfork.yate %{_libdir}/yate/extmodule.yate %{_libdir}/yate/server/yradius.yate %{_libdir}/yate/ysipchan.yate %{_libdir}/yate/yrtpchan.yate %{_libdir}/yate/ystunchan.yate %{_libdir}/yate/yiaxchan.yate %{_libdir}/yate/yjinglechan.yate %{_libdir}/yate/enumroute.yate %{_libdir}/yate/server/sipfeatures.yate %{_libdir}/yate/client/osschan.yate %{_libdir}/yate/ilbccodec.yate %{_libdir}/yate/server/heartbeat.yate %{_libdir}/yate/server/clustering.yate %{_libdir}/yate/server/mgcpca.yate %{_libdir}/yate/server/mgcpgw.yate %{_libdir}/yate/server/mrcpspeech.yate %{_libdir}/yate/server/ysigchan.yate %{_libdir}/yate/server/analog.yate %{_libdir}/yate/server/analogdetect.yate %dir %{_sysconfdir}/yate %config(noreplace) %{_sysconfdir}/yate/accfile.conf %config(noreplace) %{_sysconfdir}/yate/cdrbuild.conf %config(noreplace) %{_sysconfdir}/yate/cdrfile.conf %config(noreplace) %{_sysconfdir}/yate/dbpbx.conf %config(noreplace) %{_sysconfdir}/yate/dsoundchan.conf %config(noreplace) %{_sysconfdir}/yate/enumroute.conf %config(noreplace) %{_sysconfdir}/yate/sipfeatures.conf %config(noreplace) %{_sysconfdir}/yate/extmodule.conf %config(noreplace) %{_sysconfdir}/yate/moh.conf %config(noreplace) %{_sysconfdir}/yate/mux.conf %config(noreplace) %{_sysconfdir}/yate/pbxassist.conf %config(noreplace) %{_sysconfdir}/yate/queues.conf %config(noreplace) %{_sysconfdir}/yate/lateroute.conf %config(noreplace) %{_sysconfdir}/yate/regexroute.conf %config(noreplace) %{_sysconfdir}/yate/regfile.conf %config(noreplace) %{_sysconfdir}/yate/register.conf %config(noreplace) %{_sysconfdir}/yate/rmanager.conf %config(noreplace) %{_sysconfdir}/yate/yate.conf %config(noreplace) %{_sysconfdir}/yate/yiaxchan.conf %config(noreplace) %{_sysconfdir}/yate/yradius.conf %config(noreplace) %{_sysconfdir}/yate/yrtpchan.conf %config(noreplace) %{_sysconfdir}/yate/ystunchan.conf %config(noreplace) %{_sysconfdir}/yate/ysipchan.conf %config(noreplace) %{_sysconfdir}/yate/yjinglechan.conf %config(noreplace) %{_sysconfdir}/yate/heartbeat.conf %config(noreplace) %{_sysconfdir}/yate/clustering.conf %config(noreplace) %{_sysconfdir}/yate/mgcpca.conf %config(noreplace) %{_sysconfdir}/yate/mgcpgw.conf %config(noreplace) %{_sysconfdir}/yate/analog.conf %config(noreplace) %{_sysconfdir}/yate/ysigchan.conf %config %{_sysconfdir}/logrotate.d/yate %post ldconfig %postun ldconfig %package alsa Summary: ALSA sound driver for Yate Group: Applications/Communication ExclusiveOS: linux Provides: %{name}-audiodevice %description alsa Advanced Linux Sound Architecture audio driver for Yate. This is the recommended audio interface for using the client under Linux. %files alsa %{_libdir}/yate/client/alsachan.yate %package gsm Summary: GSM audio codec for Yate Group: Applications/Communication %description gsm European GSM 06.10 audio codec for Yate. This is a low CPU usage codec that provides moderate compression and good voice quality. %files gsm %{_libdir}/yate/gsmcodec.yate %package h323 Summary: H.323 protocol driver for Yate Group: Applications/Communication %description h323 Yate driver for the ITU-T H.323 VoIP protocol based on the OpenH323 library. %files h323 %{_libdir}/yate/h323chan.yate %config(noreplace) %{_sysconfdir}/yate/h323chan.conf %if "%{no_pstn}" != "1" %package isdn Summary: ISDN PRI card and protocol drivers for Yate Group: Applications/Communication ExclusiveOS: linux %description isdn Yate drivers for ISDN PRI cards supported by the Zaptel or Wanpipe kernel interfaces. %files isdn %{_libdir}/yate/server/wpcard.yate %{_libdir}/yate/server/zapcard.yate %config(noreplace) %{_sysconfdir}/yate/wpcard.conf %config(noreplace) %{_sysconfdir}/yate/zapcard.conf %endif %package pgsql Summary: PostgreSQL database driver for Yate Group: Applications/Communication Provides: %{name}-database %description pgsql This package allows Yate to connect to a PostgreSQL database server. All modules that support database access will be able to use PostgreSQL. %files pgsql %{_libdir}/yate/server/pgsqldb.yate %config(noreplace) %{_sysconfdir}/yate/pgsqldb.conf %package mysql Summary: MySQL database driver for Yate Group: Applications/Communication Provides: %{name}-database %description mysql This package allows Yate to connect to a MySQL database server. All modules that support database access will be able to use MySQL. %files mysql %{_libdir}/yate/server/mysqldb.yate %config(noreplace) %{_sysconfdir}/yate/mysqldb.conf %if "%{no_gui}" != "1" %package client-common Summary: Common files for all Yate clients Group: Applications/Communication %description client-common This package includes the common files needed to use Yate as a VoIP client. %files client-common %defattr(-, root, root) %{_datadir}/pixmaps/null_team-*.png %dir %{_datadir}/yate/skins %{_datadir}/yate/skins/* %dir %{_datadir}/yate/help %{_datadir}/yate/help/* %config(noreplace) %{_sysconfdir}/yate/providers.conf %package gtk2 Summary: Gtk2 client package for Yate Group: Applications/Communication Provides: %{name}-client Requires: %{name}-client-common = %{version}-%{release} %description gtk2 The yate-gtk2 package includes the files needed to use Yate as a VoIP client with a Gtk2 graphical interface. %files gtk2 %defattr(-, root, root) %{_bindir}/yate-gtk2 %{_menudir}/yate-gtk2.menu %{_datadir}/applications/yate-gtk2.desktop %config(noreplace) %{_sysconfdir}/yate/yate-gtk2.conf %post gtk2 test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true %postun gtk2 test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true %package mozilla Summary: Mozilla embedding in Yate Group: Applications/Communication Requires: %{name}-gtk2 = %{version}-%{release} Provides: %{name}-browser %description mozilla This package adds a Mozilla widget that can be embedded in a Yate client window. %files mozilla %defattr(-, root, root) %dir %{_libdir}/yate/gtk2 %{_libdir}/yate/gtk2/* %package qt4 Summary: Qt-4 client package for Yate Group: Applications/Communication Provides: %{name}-client Requires: %{name}-client-common = %{version}-%{release} %description qt4 The yate-qt4 package includes the files needed to use Yate as a VoIP client with a Qt version 4 graphical interface. %files qt4 %defattr(-, root, root) %{_bindir}/yate-qt4 %{_menudir}/yate-qt4.menu %{_datadir}/applications/yate-qt4.desktop %config(noreplace) %{_sysconfdir}/yate/yate-qt4.conf %post qt4 test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true %postun qt4 test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true %endif %package scripts Summary: External scripting package for Yate Group: Applications/Communication Requires: %{name} %description scripts The yate-scripts package includes libraries for using external scripts with Yate. %files scripts %dir %{_datadir}/yate/scripts %{_datadir}/yate/scripts/*.* %package devel Summary: Development package for Yate Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The yate-devel package includes the libraries and header files for Yate that can be used to build and install new modules. %files devel %defattr(-, root, root) %doc %{_datadir}/doc/yate-%{version}/*.html %doc %{_datadir}/doc/yate-%{version}/api/* /usr/include/* %{_libdir}/lib*.so %{_bindir}/yate-config %{_mandir}/*/yate-config.* %{_libdir}/pkgconfig/yate.pc %package all Summary: Metapackage for Yate Group: Applications/Communication Requires: %{name} = %{version}-%{release} %ifos Linux Requires: %{name}-alsa = %{version}-%{release} %endif Requires: %{name}-gsm = %{version}-%{release} Requires: %{name}-h323 = %{version}-%{release} %if "%{no_pstn}" != "1" Requires: %{name}-isdn = %{version}-%{release} %endif Requires: %{name}-mysql = %{version}-%{release} Requires: %{name}-pgsql = %{version}-%{release} %if "%{no_gui}" != "1" Requires: %{name}-gtk2 = %{version}-%{release} Requires: %{name}-mozilla = %{version}-%{release} Requires: %{name}-qt4 = %{version}-%{release} %endif Requires: %{name}-scripts = %{version}-%{release} %description all Metapackage for Yate allowing to fetch and install all components at once. It contains no files, just dependencies to all other packages. The devel package must still be installed separately. %files all %defattr(-,root,root) # disable unpackaged files check if we know we are going to skip some %if "%{no_pstn}" == "1" %define _unpackaged_files_terminate_build 0 %endif %if "%{no_gui}" == "1" %define _unpackaged_files_terminate_build 0 %endif %ifnos Linux %define _unpackaged_files_terminate_build 0 %endif %prep %setup -q -n %{name} %if "%{no_auto_deps}" == "1" %define local_find_requires %{_builddir}/%{name}/local-find-requires %define local_find_provides %{_builddir}/%{name}/local-find-provides # %{__cat} <%{local_find_requires} #! /bin/sh grep -v '\.yate$' | %{__find_requires} | grep -v '^perl' exit 0 EOF # %{__cat} <%{local_find_provides} #! /bin/sh %{__find_provides} | grep -v '\.yate$' exit 0 EOF # chmod +x %{local_find_requires} %{local_find_provides} %define _use_internal_dependency_generator 0 %define __find_requires %{local_find_requires} %define __find_provides %{local_find_provides} %define __perl_requires /bin/true %endif %build ./configure --prefix=%{prefix} --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} --includedir=%{_includedir} \ --libdir=%{_libdir} --mandir=%{_mandir} --with-archlib=%{_lib} \ --without-libspeex --without-amrnb \ --without-spandsp --without-coredumper make strip %install make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_initrddir} cp -p %{_builddir}/%{name}/packing/yate.init %{buildroot}%{_initrddir}/yate mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d cp -p %{_builddir}/%{name}/packing/yate.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/yate %clean # make clean rm -rf %{buildroot} %changelog * Thu May 15 2008 Paul Chitescu - Disabled the newly added AMR-NB from building * Mon Jan 07 2008 Paul Chitescu - Added Qt client * Fri Dec 14 2007 Paul Chitescu - Modified for Yate 2 * Sun Jul 22 2007 Paul Chitescu - Added new modules and config files * Sat Apr 14 2007 Paul Chitescu - Version 1.2.0-1 - Disabled detection of speex, fax and coredumper * Sun Feb 11 2007 Paul Chitescu - Properly create the logrotate directory * Fri Jan 26 2007 Paul Chitescu - Added log rotator configuration * Mon Sep 18 2006 Paul Chitescu - Version 1.1.0-1 * Mon Jul 10 2006 Paul Chitescu - Added metapackage yate-all * Fri Jul 07 2006 Paul Chitescu - Built separate packages for modules with external dependencies - By default packages have dependencies * Tue Jul 04 2006 Paul Chitescu - Version 1.0.0-pre1 - Capability to add a distro release tag at rpmbuild time * Fri Jun 16 2006 Paul Chitescu - Added .desktop and .menu files and update-menus scriptlets * Mon Nov 07 2005 Paul Chitescu - Version 0.9.0-pre4 - Separated modules and scripts directories * Mon Oct 24 2005 Paul Chitescu - Version 0.9.0-pre3 - Changed obsolete Copyright: tag to License: to keep newer RPMs happy * Mon Oct 10 2005 Diana Cionoiu - Version 0.9.0-pre2 * Tue Sep 06 2005 Paul Chitescu - Version 0.9.0-pre1 * Tue Jan 18 2005 Paul Chitescu - Version 0.8.7 * Mon Jan 10 2005 Paul Chitescu - Version 0.8.6 - Versioned the shared library and packaged manpage for yate-config * Sun Jan 09 2005 Paul Chitescu - Cleaned up the build and packaging system * Wed Dec 15 2004 Paul Chitescu - Added custom requires/provides filters to supress modules dependencies * Mon Nov 29 2004 Paul Chitescu - Version 0.8.5 - Removed non-packaging changes - see ChangeLog instead * Wed Sep 29 2004 Paul Chitescu - Version 0.8.4 * Sat Jun 26 2004 Paul Chitescu - Version 0.8.3 * Sat May 15 2004 Paul Chitescu - Added pkgconfig support * Sun Apr 04 2004 Paul Chitescu - Added yate-config to the devel package * Mon Mar 29 2004 Paul Chitescu - Created specfile