File gsm-codec-lib.spec of Package gsm-codec-lib

#
# spec file for package gsm-codec-lib
#
# Copyright (c) 2023-2024, Martin Hauke <mardnh@gmx.de>
#
# 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/
#

%define freecalypso_dir /opt/freecalypso/
Name:           gsm-codec-lib
Version:        r4
Release:        0
Summary:        Themyscira Wireless GSM codec libraries & utilities package
License:        SUSE-Public-Domain
Group:          System/Libraries
URL:            https://www.freecalypso.org/software.html
#Hg-Clone:      https://www.freecalypso.org/hg/gsm-codec-lib/
Source:         ftp://ftp.freecalypso.org/pub/GSM/codecs/%{name}-%{version}.tar.bz2
BuildRequires:  libgsm-devel
BuildRequires:  libpcap-devel

%description
Themyscira Wireless GSM codec libraries & utilities package.

%prep
%setup -q
# HACK: use proper include directory for gsm.h
find . -name *.c -or -name *.h | xargs sed -i 's|#include <gsm.h>|#include <gsm/gsm.h>|g'

%build
%define _lto_cflags %{nil}
# non-automake ./configure
./configure --prefix=%{buildroot}%{freecalypso_dir} CFLAGS='%{optflags} -Wno-return-type -Wno-implicit'
%make_build V=1

%install
# non-automake install
make install V=1

%files
%license LICENSE
%doc Library-versions PACKAGING README
%doc doc/*

%dir %{freecalypso_dir}/include
%dir %{freecalypso_dir}/lib

# libgsmamr (version 1.0.0, see Library-versions)
%{freecalypso_dir}/lib/libtwamr.a
%{freecalypso_dir}/include/tw_amr.h

# libgsmefr (version 1.0.0, see Library-versions)
%{freecalypso_dir}/lib/libgsmefr.a
%{freecalypso_dir}/include/gsm_efr.h

# libgsmfr (version 1.0.0, see Library-versions; depends on libgsm-devel
%{freecalypso_dir}/lib/libgsmfr2.a
%{freecalypso_dir}/include/tw_gsmfr.h

# themwi-codec-utils
# Group: Productivity/Telephony/Utilities
%dir %{freecalypso_dir}
%dir %{freecalypso_dir}/bin

%{freecalypso_dir}/bin/amr-cod-parse
%{freecalypso_dir}/bin/amr-cod2ietf
%{freecalypso_dir}/bin/amr-ietf-parse
%{freecalypso_dir}/bin/amr-ietf2cod
%{freecalypso_dir}/bin/amrefr-decode-r
%{freecalypso_dir}/bin/amrefr-encode-r
%{freecalypso_dir}/bin/amrefr-tseq-dec
%{freecalypso_dir}/bin/amrefr-tseq-enc
%{freecalypso_dir}/bin/amrts-pcm8-compact
%{freecalypso_dir}/bin/gsm-amr2efr
%{freecalypso_dir}/bin/gsm-efr2amr
%{freecalypso_dir}/bin/gsmefr-cod-parse
%{freecalypso_dir}/bin/gsmefr-cod2gsmx
%{freecalypso_dir}/bin/gsmefr-dec-parse
%{freecalypso_dir}/bin/gsmefr-decode
%{freecalypso_dir}/bin/gsmefr-decode-r
%{freecalypso_dir}/bin/gsmefr-decode-tw5
%{freecalypso_dir}/bin/gsmefr-decode-tw5-r
%{freecalypso_dir}/bin/gsmefr-dlcap-dec
%{freecalypso_dir}/bin/gsmefr-dlcap-gsmx
%{freecalypso_dir}/bin/gsmefr-dlcap-parse
%{freecalypso_dir}/bin/gsmefr-dlcap-sync
%{freecalypso_dir}/bin/gsmefr-encode
%{freecalypso_dir}/bin/gsmefr-encode-r
%{freecalypso_dir}/bin/gsmefr-etsi-dec
%{freecalypso_dir}/bin/gsmefr-etsi-enc
%{freecalypso_dir}/bin/gsmefr-rec2etsi
%{freecalypso_dir}/bin/gsmfr-cod2std
%{freecalypso_dir}/bin/gsmfr-decode
%{freecalypso_dir}/bin/gsmfr-decode-r
%{freecalypso_dir}/bin/gsmfr-decode-rb
%{freecalypso_dir}/bin/gsmfr-decode-tw5
%{freecalypso_dir}/bin/gsmfr-decode-tw5-r
%{freecalypso_dir}/bin/gsmfr-dlcap-gsmx
%{freecalypso_dir}/bin/gsmfr-dlcap-parse
%{freecalypso_dir}/bin/gsmfr-dlcap-sync
%{freecalypso_dir}/bin/gsmfr-encode
%{freecalypso_dir}/bin/gsmfr-encode-r
%{freecalypso_dir}/bin/gsmfr-preproc
%{freecalypso_dir}/bin/gsmfr-tfo-xfrm
%{freecalypso_dir}/bin/gsmrec-dump
%{freecalypso_dir}/bin/gsmx-to-tw5a
%{freecalypso_dir}/bin/pcm16-check13
%{freecalypso_dir}/bin/pcm16-raw2wav
%{freecalypso_dir}/bin/pcm16-to-alaw
%{freecalypso_dir}/bin/pcm16-to-ulaw
%{freecalypso_dir}/bin/pcm16-wav2raw
%{freecalypso_dir}/bin/pcm8-to-pcm16
%{freecalypso_dir}/bin/tw5a-dump
%{freecalypso_dir}/bin/tw5a-to-gsmx
%{freecalypso_dir}/bin/twamr-decode
%{freecalypso_dir}/bin/twamr-decode-r
%{freecalypso_dir}/bin/twamr-encode
%{freecalypso_dir}/bin/twamr-encode-r
%{freecalypso_dir}/bin/twamr-tseq-dec
%{freecalypso_dir}/bin/twamr-tseq-enc

%changelog
openSUSE Build Service is sponsored by