1 Star 0 Fork 8

李宁杰/sox

forked from src-openEuler/sox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sox.spec 4.72 KB
一键复制 编辑 原始数据 按行查看 历史
Name: sox
Version: 14.4.2.0
Release: 29
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
# - upstream patch: https://sourceforge.net/p/sox/mailman/sox-devel/thread/[email protected]/#msg36303839
Patch1007: CVE-2017-18189.patch
# https://sources.debian.org/src/sox/14.4.2%252Bgit20190427-4/debian/patches/
Patch1008: CVE-2021-33844.patch
Patch1009: CVE-2023-32627.patch
# CVE-2021-23159 is the same as CVE-2023-34432,CVE-2023-34318,CVE-2021-23172
Patch1010: CVE-2021-23159.patch
# CVE-2021-3643 is the same as CVE-2021-23210
Patch1011: CVE-2021-3643.patch
# CVE-2022-31650 is the same as CVE-2023-26590
Patch1012: CVE-2022-31650.patch
Patch1013: CVE-2022-31651.patch
Patch1014: CVE-2023-32627.patch
# Tests:
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
%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
Requires: %{name} = %{version}-%{release}
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 -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 \
--disable-static --with-distro=%{_vendor} --with-dyn-default
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
* Thu Dec 07 2023 yaqiangchen <[email protected]> - 14.4.2.0-29
- Fix CVE-2021-33844,CVE-2023-32627,CVE-2021-23159,CVE-2023-34432
- CVE-2023-34318,CVE-2021-23172,CVE-2021-3643,CVE-2021-23210
- CVE-2022-31650,CVE-2023-26590,CVE-2022-31651,CVE-2023-32627
- CVE-2017-18189
* Fri Jul 30 2021 chenyanpanHW <[email protected]> - 14.4.2.0-28
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
* Fri Apr 3 2020 duyeyu <[email protected]> - 14.4.2.0-27
- Modify configure parameters
* Thu Mar 12 2020 Jiangping Hu <[email protected]> - 14.4.2.0-26
- Fix a require of devel package
* Mon Dec 9 2019 openEuler Buildteam <[email protected]> - 14.4.2.0-25
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li_ning_jie/sox.git
[email protected]:li_ning_jie/sox.git
li_ning_jie
sox
sox
master

搜索帮助