2019-12-17 16:13:32 +08:00
|
|
|
Name: sox
|
|
|
|
|
Version: 14.4.2.0
|
2020-04-03 16:58:19 +08:00
|
|
|
Release: 27
|
2019-12-17 16:13:32 +08:00
|
|
|
Summary: A general purpose sound file conversion tool
|
|
|
|
|
License: GPLv2+ and LGPLv2+ and MIT
|
|
|
|
|
URL: http://sox.sourceforge.net/
|
|
|
|
|
Source0: https://github.com/i386x/sox-downstream/archive/sox-14.4.2.0.modified.tar.gz
|
|
|
|
|
Source1: binpatch.py
|
|
|
|
|
|
|
|
|
|
Patch0001: sox-14.4.2-lsx_symbols.patch
|
|
|
|
|
Patch0002: sox-14.4.2-lpc10.patch
|
|
|
|
|
Patch0003: sox-14.4.2-fsf_address_fix.patch
|
|
|
|
|
Patch1000: sox-14.4.2-bug_1500570_fix.patch
|
|
|
|
|
Patch1001: sox-14.4.2-bug_1500554_fix.patch
|
|
|
|
|
Patch1002: sox-14.4.2-bug_1500553_fix.patch
|
|
|
|
|
Patch1003: sox-14.4.2-bug_1510923_fix.patch
|
|
|
|
|
Patch1004: sox-14.4.2-hcom_stopwrite_big_endian_bug_fix.patch
|
|
|
|
|
Patch1005: sox-14.4.2-bug_1226675_fix.patch
|
|
|
|
|
Patch1006: sox-14.4.2-bug_1480678_fix.patch
|
|
|
|
|
Patch9000: sox-14.4.2-installcheck_fix.patch
|
|
|
|
|
BuildRequires: gcc, libvorbis-devel, alsa-lib-devel, libtool-ltdl-devel
|
|
|
|
|
BuildRequires: gsm-devel, wavpack-devel, ladspa-devel, libpng-devel
|
|
|
|
|
BuildRequires: flac-devel, libao-devel, libsndfile-devel, libid3tag-devel
|
|
|
|
|
BuildRequires: pulseaudio-libs-devel, opusfile-devel
|
|
|
|
|
BuildRequires: libtool, libmad-devel, lame-devel, twolame-devel
|
|
|
|
|
BuildRequires: python3, time, libsamplerate-devel, git
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility
|
|
|
|
|
that can convert various formats of computer audio files in to other formats.
|
|
|
|
|
It can also apply various effects to these sound files, and, as an added
|
|
|
|
|
bonus, SoX can play and record audio files on most platforms.
|
|
|
|
|
|
|
|
|
|
%package -n sox-devel
|
|
|
|
|
Summary: package of sox development file
|
2020-03-12 10:21:22 +08:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2019-12-17 16:13:32 +08:00
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
|
|
%description -n sox-devel
|
|
|
|
|
This package contains the library needed for compiling applications
|
|
|
|
|
which will use the SoX sound file format converter.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-downstream-%{name}-%{version}.modified -Sgit -p1
|
|
|
|
|
autoreconf -vfi
|
|
|
|
|
cp ${RPM_SOURCE_DIR}/binpatch.py binpatch.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
|
|
|
|
|
%configure --without-lpc10 --with-gsm --includedir=%{_includedir}/sox \
|
2020-04-03 16:53:36 +08:00
|
|
|
--disable-static --with-distro=openEuler --with-dyn-default
|
2019-12-17 16:13:32 +08:00
|
|
|
make V=1 %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
%delete_la_and_a
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
libsox_so="${RPM_BUILD_ROOT}%{_libdir}/libsox.so"
|
|
|
|
|
[[ -L $libsox_so ]] && libsox_so=$(readlink -e $libsox_so) || :
|
|
|
|
|
[[ -z "$libsox_so" ]] && {
|
|
|
|
|
echo "Path to libsox.so cannot be resolved" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
[[ -f "$libsox_so" ]] || {
|
|
|
|
|
echo "$libsox_so is not a file" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
cp $libsox_so $libsox_so.orig
|
|
|
|
|
plugins_path=$(python3 binpatch.py $libsox_so)
|
|
|
|
|
[[ -z "$plugins_path" ]] && {
|
|
|
|
|
echo "$libsox_so cannot be patched" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
mkdir -p $plugins_path
|
|
|
|
|
for l in ${RPM_BUILD_ROOT}%{_libdir}/sox/libsox_fmt_*.so; do
|
|
|
|
|
cp $l $plugins_path/$(basename $l)
|
|
|
|
|
done
|
|
|
|
|
PATH=${RPM_BUILD_ROOT}%{_bindir}:$PATH
|
|
|
|
|
export PATH
|
|
|
|
|
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}:$LD_LIBRARY_PATH
|
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
make installcheck DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
[[ -d /var/tmp/l ]] && rm -rfd /var/tmp/l || :
|
|
|
|
|
[[ -d /var/tmp/sox ]] && rm -rfd /var/tmp/sox || :
|
|
|
|
|
rm $libsox_so
|
|
|
|
|
mv $libsox_so.orig $libsox_so
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%license COPYING
|
|
|
|
|
%doc AUTHORS ChangeLog README
|
|
|
|
|
%{_bindir}/play
|
|
|
|
|
%{_bindir}/rec
|
|
|
|
|
%{_bindir}/sox
|
|
|
|
|
%{_bindir}/soxi
|
|
|
|
|
%{_libdir}/libsox.so.*
|
|
|
|
|
%dir %{_libdir}/sox/
|
|
|
|
|
%{_libdir}/sox/libsox_fmt_*.so
|
|
|
|
|
|
|
|
|
|
%files -n sox-devel
|
|
|
|
|
%{_includedir}/sox
|
|
|
|
|
%{_libdir}/libsox.so
|
|
|
|
|
%{_libdir}/pkgconfig/sox.pc
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man7/*
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-04-03 17:08:51 +08:00
|
|
|
* Fri Apr 3 2020 duyeyu <duyeyu@huawei.com> - 14.4.2.0-27
|
2020-04-03 16:58:19 +08:00
|
|
|
- Modify configure parameters
|
|
|
|
|
|
2020-03-12 10:21:22 +08:00
|
|
|
* Thu Mar 12 2020 Jiangping Hu <hujp1985@foxmail.com> - 14.4.2.0-26
|
|
|
|
|
- Fix a require of devel package
|
|
|
|
|
|
2019-12-17 16:13:32 +08:00
|
|
|
* Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 14.4.2.0-25
|
|
|
|
|
- Package init
|