File libgsm.spec of Package libgsm

#
# spec file for package libgsm (Version 1.0.12)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libgsm
%define _name gsm
Version:        1.0.12
Release:        2
%define _version 1.0-pl12
Group:          Productivity/Multimedia/Sound/Editors and Convertors
License:        BSD 3-Clause
Summary:        GSM 06.10 Lossy Speech Compressor Library and Utilities
Source:         %{_name}-%{version}.tar.bz2
Url:            http://kbs.cs.tu-berlin.de/~jutta/toast.html
# This is a Debian patch file with debian chunks removed.
Patch:          %{name}-%{version}.patch
Patch1:         libgsm-paths.patch
Patch2:         libgsm-include.patch
Patch3:         libgsm-strict-aliasing.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Contains libraries and binaries for a GSM speech compressor. libgsm
contains a standard implementation of the European GSM 06.10
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
which uses RPE/LTP (residual pulse excitation/long term prediction)
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit samples
(8 kHz sampling rate, which is a frame rate of 50 Hz) into 260 bits.
For compatibility with typical UNIX applications, our implementation
turns frames of 160 16-bit linear samples into 33-byte frames (1650
Bytes/s). The quality of the algorithm is good enough for reliable
speaker recognition. Even music often survives transcoding in
recognizable form (given the bandwidth limitations of 8 kHz sampling
rate). The interfaces offered are a front-end modeled after compress(1)
and a library API.  Compression and decompression run faster than
real-time on most SPARC stations.  The implementation has been verified
against the ETSI standard test patterns.



Authors:
--------
    Jutta Degener <jutta@pobox.com>
    Carsten Bormann

%package -n libgsm1
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Summary:        GSM 06.10 Lossy Speech Compressor Library and Utilities
# Last appeared in OpenSUSE 10.3:
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libgsm1
Contains libraries and binaries for a GSM speech compressor. libgsm
contains a standard implementation of the European GSM 06.10
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
which uses RPE/LTP (residual pulse excitation/long term prediction)
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit samples
(8 kHz sampling rate, which is a frame rate of 50 Hz) into 260 bits.
For compatibility with typical UNIX applications, our implementation
turns frames of 160 16-bit linear samples into 33-byte frames (1650
Bytes/s). The quality of the algorithm is good enough for reliable
speaker recognition. Even music often survives transcoding in
recognizable form (given the bandwidth limitations of 8 kHz sampling
rate). The interfaces offered are a front-end modeled after compress(1)
and a library API.  Compression and decompression run faster than
real-time on most SPARC stations.  The implementation has been verified
against the ETSI standard test patterns.



Authors:
--------
    Jutta Degener <jutta@pobox.com>
    Carsten Bormann

%package utils
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Summary:        GSM 06.10 Lossy Speech Compressor Library and Utilities
# Last appeared in OpenSUSE 10.3:
Provides:       %{name}:%{_bindir}/toast

%description utils
Contains libraries and binaries for a GSM speech compressor. libgsm
contains a standard implementation of the European GSM 06.10
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
which uses RPE/LTP (residual pulse excitation/long term prediction)
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit samples
(8 kHz sampling rate, which is a frame rate of 50 Hz) into 260 bits.
For compatibility with typical UNIX applications, our implementation
turns frames of 160 16-bit linear samples into 33-byte frames (1650
Bytes/s). The quality of the algorithm is good enough for reliable
speaker recognition. Even music often survives transcoding in
recognizable form (given the bandwidth limitations of 8 kHz sampling
rate). The interfaces offered are a front-end modeled after compress(1)
and a library API.  Compression and decompression run faster than
real-time on most SPARC stations.  The implementation has been verified
against the ETSI standard test patterns.



Authors:
--------
    Jutta Degener <jutta@pobox.com>
    Carsten Bormann

%package devel
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Summary:        GSM 06.10 Lossy Speech Compressor Library and Utilities
Requires:       libgsm1 = %{version}

%description devel
Contains libraries and binaries for a GSM speech compressor. libgsm
contains a standard implementation of the European GSM 06.10
provisional standard for full-rate speech transcoding, prI-ETS 300 036,
which uses RPE/LTP (residual pulse excitation/long term prediction)
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit samples
(8 kHz sampling rate, which is a frame rate of 50 Hz) into 260 bits.
For compatibility with typical UNIX applications, our implementation
turns frames of 160 16-bit linear samples into 33-byte frames (1650
Bytes/s). The quality of the algorithm is good enough for reliable
speaker recognition. Even music often survives transcoding in
recognizable form (given the bandwidth limitations of 8 kHz sampling
rate). The interfaces offered are a front-end modeled after compress(1)
and a library API.  Compression and decompression run faster than
real-time on most SPARC stations.  The implementation has been verified
against the ETSI standard test patterns.



Authors:
--------
    Jutta Degener <jutta@pobox.com>
    Carsten Bormann

%prep
%setup -n %{_name}-%{_version}
%patch -p1
%patch1
%patch2
%patch3

%build
make CCFLAGS="-c $RPM_OPT_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -DNeedFunctionPrototypes=1" lib/libgsm.a
cp lib/libgsm.a lib/libgsm.a.save
make clean
make CCFLAGS="-c $RPM_OPT_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -DNeedFunctionPrototypes=1 -fPIC"
cp lib/libgsm.a.save lib/libgsm.a
touch lib/libgsm.a

%install
mkdir -p $RPM_BUILD_ROOT%{_prefix}/{include/gsm,%{_lib},bin,share/man/man{1,3}}
make INSTALL_ROOT=$RPM_BUILD_ROOT%{_prefix} GSM_INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir} install
cp -d lib/libgsm.so* $RPM_BUILD_ROOT%{_libdir}
( cd $RPM_BUILD_ROOT%{_libdir} ; ln -sf libgsm.so.1 libgsm.so )
cp inc/{private.h,proto.h,unproto.h} $RPM_BUILD_ROOT%{_includedir}/gsm/

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libgsm1 -p /sbin/ldconfig

%postun -n libgsm1 -p /sbin/ldconfig

%files utils
%defattr (-, root, root)
%{_bindir}/*
%doc %{_mandir}/man1/*.*

%files -n libgsm1
%defattr (-, root, root)
%doc COPYRIGHT ChangeLog MACHINES README
%{_libdir}/*.so.*

%files devel
%defattr (-, root, root)
%{_libdir}/*.so
%{_libdir}/*.*a
%doc %{_mandir}/man3/*.*
%{_includedir}/gsm

%changelog
* Fri Feb 22 2008 sbrabec@suse.cz
- Added Provides, Obsoletes and split-provides for old names.
* Mon Jan 28 2008 sbrabec@suse.cz
- Updated to version 1.0.12:
  * removed modifiable static storage that made the library
  non-reentrant.
  * fix WAV49 implode move source archive location
- Split package according to shared library packaging policy.
* Tue Aug 08 2006 sbrabec@suse.cz
- Compile with WAV-style framing support.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 09 2006 sbrabec@suse.cz
- New SuSE package, version 1.0.10.
openSUSE Build Service is sponsored by