%define snap 20210509 %define rel 1 %define major 3 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Summary: A general purpose sound file conversion tool Name: sox Version: 14.4.3 Release: %mkrel 0.git%{snap}.%{rel} License: LGPLv2+ Group: Sound/Editors and Converters URL: http://sox.sourceforge.net/ #Source0: http://heanet.dl.sourceforge.net/sourceforge/sox/%{name}-%{version}.tar.bz2 # rm -rf sox-code && git clone https://git.code.sf.net/p/sox/code sox-code && cd sox-code # git archive --prefix=sox-$(git log -1 --date=format:%Y%m%d --format=%cd)/ --format=tar HEAD | xz -9e -T0 > ../sox-$(git log -1 --date=format:%Y%m%d --format=%cd).tar.xz Source0: %{name}-%{snap}.tar.xz # Patch1: sox-arm-skip-stack-protector-strong.patch Patch2: sox-arm-skip-other-appended-flags.patch # From Fedora. See: # -rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=1309426 [CLOSED DUPL] # https://bugzilla.redhat.com/show_bug.cgi?id=1226675 # https://bugzilla.redhat.com/show_bug.cgi?id=1540762 [CLOSED DUPL] # https://bugzilla.redhat.com/show_bug.cgi?id=1492910 [CLOSED DUPL] # - upstream discussion: https://sourceforge.net/p/sox/bugs/309/ Patch1005: sox-14.4.2-bug_1226675_fix.patch BuildRequires: ffmpeg-devel BuildRequires: file-devel BuildRequires: gsm-devel BuildRequires: id3tag-devel BuildRequires: ladspa-devel BuildRequires: libalsa-devel BuildRequires: libflac-devel BuildRequires: libltdl-devel BuildRequires: libpng-devel BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: libtheora-devel BuildRequires: libtool BuildRequires: libwavpack-devel BuildRequires: lpc10-devel BuildRequires: mad-devel BuildRequires: pkgconfig(opusfile) BuildRequires: oggvorbis-devel BuildRequires: libgomp-devel BuildRequires: lame-devel %description SoX (Sound eXchange) is a sound file format converter for Linux, UNIX and DOS PCs. The self-described 'Swiss Army knife of sound tools,' SoX can convert between many different digitized sound formats and perform simple sound manipulation functions, including sound effects. Install the sox package if you'd like to convert sound file formats or manipulate some sounds. %package -n %{libname} Summary: Libraries for SoX Group: System/Libraries Obsoletes: %mklibname st 0 %description -n %{libname} Libraries for SoX. %package -n %{develname} Summary: Development headers and libraries for libst Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} Development headers and libraries for SoX. %prep %setup -q -n %{name}-%{snap} %patch1 -p1 %patch2 -p1 %patch1005 -p1 %build autoreconf -fi export CFLAGS="%{optflags} -DHAVE_SYS_SOUNDCARD_H=1 -D_FILE_OFFSET_BITS=64 -fPIC -DPIC" %configure --with-distro="%_vendor" \ --with-ladspa-path=%{_includedir} %make_build %install %make_install ln -sf play %{buildroot}%{_bindir}/rec cat << EOF > %{buildroot}%{_bindir}/soxplay #!/bin/sh %{_bindir}/sox \$1 -t .au - > /dev/audio EOF chmod 755 %{buildroot}%{_bindir}/soxplay ln -snf play %{buildroot}%{_bindir}/rec ln -s play.1%{_extension} %{buildroot}%{_mandir}/man1/rec.1%{_extension} find %{buildroot} -name *.la | xargs rm -f find %{buildroot} -name *.a | xargs rm -f %files %doc ChangeLog NEWS AUTHORS %{_bindir}/play %{_bindir}/rec %{_bindir}/sox* %{_mandir}/man1/* %{_mandir}/man7/* %files -n %{libname} %{_libdir}/libsox.so.%{major}{,.*} %files -n %{develname} %{_includedir}/*.h %{_libdir}/libsox.so %{_libdir}/pkgconfig/sox.pc %{_mandir}/man3/*