File bayonne2.spec of Package bayonne2

#
# spec file for package bayonne2
#
# Copyright (c) 2012 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/
#


Name:           bayonne2
%define lname	libbayonne-2_3-0
# plugins to libbayonne or so:
%define ldname	libbayonne-2_3
Version:        2.3.2
Release:        0
Summary:        The telephony server of the GNU project
License:        GPL-2.0+
Group:          Productivity/Telephony/Servers
Url:            http://gnu.org/software/bayonne
Source0:        %{name}-%{version}.tar.bz2
Patch0:         %{name}-opensuse.patch
Patch1:         bayonne2-const_char.patch
Patch2:         bayonne2-rlimit.patch
Patch3:         bayonne2-libtool.patch
BuildRequires:  SDL-devel
BuildRequires:  ccaudio2-devel
BuildRequires:  ccrtp-devel
BuildRequires:  ccscript3-devel
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  ghostscript
BuildRequires:  libdv
BuildRequires:  libtool
BuildRequires:  openh323-devel
BuildRequires:  openldap2-devel
BuildRequires:  pam-devel
BuildRequires:  pkgconfig
BuildRequires:  pwlib-devel
BuildRequires:  python-devel
BuildRequires:  sox-devel
BuildRequires:  speex-devel
BuildRequires:  texlive-epstopdf
%ifnarch s390 s390x
BuildRequires:  capi4linux
BuildRequires:  capi4linux-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq
PreReq:         %insserv_prereq
Recommends:     cron
Recommends:     logrotate

%description
Bayonne offers a script programmable modular server for deploying
multi-line telephony voice response and computer telephony
applications.

%package -n %lname
Summary:        The telephony server of the GNU project
Group:          System/Libraries
Requires:       %ldname = %version

%description -n %lname
Bayonne offers a script programmable modular server for deploying
multi-line telephony voice response and computer telephony
applications.

%package -n %ldname
Summary:        The telephony server of the GNU project
Group:          System/Libraries

%description -n %ldname
Bayonne offers a script programmable modular server for deploying
multi-line telephony voice response and computer telephony
applications.

%package devel
Summary:        The telephony server of the GNU project
Group:          Development/Libraries/Other
Requires:       %lname = %version
Requires:       ccaudio2-devel
Requires:       ccscript3-devel

%description devel
This package provides header and support files for building
additional applications for bayonne.
The telephony server of the GNU project

%package UsEng
Summary:        Voice library for US English Male speaker
Group:          Productivity/Telephony/Servers
Requires:       %{name} = %{version}

%description UsEng
The US English speaker library offers default voice prompts for the
Bayonne telephony server.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p0
%patch3 -p1

%build
autoreconf --force --install
%configure --with-pic \
	--disable-static \
	--libexecdir=%{_datadir}/bayonne/exec \
	--without-openh323
make CFLAGS="%{optflags}" %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_sysconfdir}/init.d
mkdir -p %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_sbindir}
%make_install
ln -s ../../etc/init.d/bayonne %{buildroot}%{_sbindir}/rcbayonne
rm -f %{buildroot}%{_libdir}/libbayonne.la

%preun
%stop_on_removal bayonne

%post
%{fillup_and_insserv bayonne}

%postun
%restart_on_update bayonne
%{insserv_cleanup}

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS README
%dir %{_sysconfdir}/bayonne
%config(noreplace) %{_sysconfdir}/bayonne/*.conf
%config %{_sysconfdir}/logrotate.d/bayonne
%config %{_sysconfdir}/init.d/bayonne
%{_sbindir}/bayonne
%{_sbindir}/rcbayonne
%{_bindir}/audiosync
%{_bindir}/btsencode
%{_bindir}/btsexec
%{_bindir}/btsexec-perl
%{_bindir}/btsexec-php
%{_bindir}/btsexec-python
%{_bindir}/btsmusic
%{_bindir}/ttstool
%{_datadir}/bayonne/
%{_mandir}/man1/*.1*

%files -n %lname
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libbayonne-2.3.so.0*

%files -n %ldname
%defattr(-,root,root)
%{_libdir}/bayonne-2.3

%files devel
%defattr(-,root,root)
%dir %{_includedir}/cc++/
%{_includedir}/cc++/*.h
%{_libdir}/libbayonne.so
%{_libdir}/pkgconfig/libbayonne.pc
%doc docs/html/*

%files UsEng
%defattr(-,root,root)
%dir %{_datadir}/phrasebook
%dir %{_datadir}/phrasebook/none
%dir %{_datadir}/phrasebook/none/prompts
%{_datadir}/phrasebook/none/prompts/*

%changelog
openSUSE Build Service is sponsored by