libgsm/libgsm.spec
Tomáš Chvátal d9cdbdec52 Accepting request 678435 from home:iznogood:branches:multimedia:libs
- Update to version 1.0.18
  * Remove the MacOS "quarantine" files that I didn't know I'd
    shipped.
  * Remove some trailing spaces.
  * Bump up the patchlevel in inc/gsm.h (I'd forgotten that in
    release 17.)
- Changes from version 1.0.17
  * New email addresses in the README.
  * Avoid left-shifting signed integers.
  * Don't print longwords using %d or %ld, cast them to (long)
    first.
  * Don't compare longwords as longs in addtest, we only care for
    the lower 32 bits. (The math works, but the test failed).
- Changes from version 1.0.16
  * New email addresses in the manual pages (patch 16).
  * Removed a stray .orig file (in patch 15).
- Rebase libgsm-1.0.13.patch.
- Drop libgsm-strict-aliasing.patch: Applied upstream.
- Drop ancient Obsoletes/Provides.

OBS-URL: https://build.opensuse.org/request/show/678435
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libgsm?expand=0&rev=21
2019-02-24 18:27:14 +00:00

131 lines
4.5 KiB
RPMSpec

#
# spec file for package libgsm
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
Name: libgsm
%define _name gsm
Version: 1.0.18
Release: 0
%define _version 1.0-pl18
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
License: ISC
Group: Productivity/Multimedia/Sound/Editors and Convertors
Source: http://www.quut.com/gsm/%{_name}-%{version}.tar.gz
Source2: baselibs.conf
Url: http://www.quut.com/gsm/
# This is a Debian patch file with debian chunks removed.
Patch: %{name}-1.0.13.patch
Patch1: libgsm-paths.patch
Patch2: libgsm-include.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
libgsm implements the European GSM 06.10 provisional standard for
full-rate speech transcoding, prI-ETS 300 036, which uses RPE/LTP
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit
samples (8 kHz sampling rate) into 260 bits.
%package -n libgsm1
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
Group: Productivity/Multimedia/Sound/Editors and Convertors
%description -n libgsm1
Contains the library for a GSM speech compressor.
libgsm implements 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) into 260 bits.
%package utils
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
Group: Productivity/Multimedia/Sound/Editors and Convertors
%description utils
Contains binaries for a GSM speech compressor, verified against the
ETSI standard test patterns.
libgsm implements 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) into 260 bits.
The front-end is modeled after the historic compress(1) utility.
%package devel
Summary: GSM 06.10 Lossy Speech Compressor Library and Utilities
Group: Productivity/Multimedia/Sound/Editors and Convertors
Requires: libgsm1 = %{version}
%description devel
Contains the development kit for the libgsm speech compressor.
libgsm implements the European GSM 06.10 provisional standard for
full-rate speech transcoding, prI-ETS 300 036, which uses RPE/LTP
coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit
samples (8 kHz sampling rate) into 260 bits.
This implementation turns frames of 160 16-bit linear samples into
33-byte frames (1650 bytes/s) and has been verified against the ETSI
standard test patterns.
%prep
%setup -n %{_name}-%{_version}
%patch -p1
%patch1
%patch2
%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/
%{__rm} -f %{buildroot}%{_libdir}/*.a
%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)
%license COPYRIGHT
%doc ChangeLog MACHINES README
%{_libdir}/*.so.*
%files devel
%defattr (-, root, root)
%{_libdir}/*.so
%doc %{_mandir}/man3/*.*
%{_includedir}/gsm
%changelog