File sox.spec of Package sox
#
# spec file for package sox (Version 14.3.0)
#
# Copyright (c) 2009 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/
#
%bcond_with ffmpeg
%bcond_with mad
%bcond_with lame
%bcond_with amrwb
%bcond_with amrnb
Name: sox
BuildRequires: alsa-devel flac-devel ladspa-devel libao-devel libgsm-devel libid3tag-devel libpng-devel libpulse-devel libsamplerate-devel libsndfile-devel libvorbis-devel pkg-config wavpack-devel
%if %{with ffmpeg}
BuildRequires: libffmpeg-devel
%endif
%if %{with mad}
BuildRequires: libmad-devel
%endif
%if %{with lame}
BuildRequires: libmp3lame-devel
%endif
%if %{with amrwb}
BuildRequires: libamrwb-devel
%endif
%if %{with amrnb}
BuildRequires: libamrnb-devel
%endif
License: BSD 3-clause (or similar) ; GPL v2 or later
Group: Productivity/Multimedia/Sound/Editors and Convertors
AutoReqProv: on
Version: 14.3.0
Release: 2
Summary: Sound Conversion Tools and Library
Url: http://sox.sourceforge.net
Source: %{name}-%{version}.tar.bz2
Source1: audioio.h
Patch0: %{name}-14.2.0-vorbis.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SOX is intended to be the Swiss Army knife of sound processing tools.
It does many things, it just does not do them all well. Sooner or later
it will come in very handy. SOX is really only usable day-to-day if you
hide the wacky options with one-line shell scripts.
Authors:
--------
Chris Bagwell <cbagwell@sprynet.com>
%package devel
License: BSD 3-clause (or similar) ; GPL v2 or later
Group: Development/Libraries/C and C++
Summary: Sound Conversion Tools and Library
Requires: %{name} = %{version}
Requires: pkg-config
%description devel
SOX is intended to be the Swiss Army knife of sound processing tools.
It does many things, it just does not do them all well. Sooner or later
it will come in very handy. SOX is really only usable day-to-day if you
hide the wacky options with one-line shell scripts.
Authors:
--------
Chris Bagwell <cbagwell@sprynet.com>
%prep
%setup -q
%patch0
%build
if [ ! -f %{_includedir}/sun/audioio.h ]; then
mkdir -p include/sun
cp %{S:1} include/sun/audioio.h
fi
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector -DEXTERNAL_GSM -DHAVE_SYS_SOUNDCARD_H -fPIC -DPIC"
export CPPFLAGS=-I$PWD/include
export LDFLAGS=-lltdl
%configure \
--disable-static \
--enable-dl-mad \
--enable-dl-lame
make %{?jobs:-j%jobs}
%install
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/{man1,man3,man7}}
make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/sox/*.la
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README src/monkey.*
%{_bindir}/*
%{_libdir}/lib*.so.*
# %dir %{_libdir}/sox
# %{_libdir}/sox/*.so
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/sox.pc
%changelog