libsndfile/libsndfile.spec
2019-09-30 10:58:11 -04:00

161 lines
3.8 KiB
RPMSpec

Name: libsndfile
Version: 1.0.28
Release: 13
Summary: Library for reading and writing sound files
License: LGPLv2+ and GPLv2+ and BSD
URL: http://www.mega-nerd.com/libsndfile/
Source0: http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz
BuildRequires: alsa-lib-devel gcc gcc-c++ flac-devel gsm-devel
BuildRequires: libogg-devel libtool libvorbis-devel pkgconfig
BuildRequires: sqlite-devel
Patch0: libsndfile-1.0.25-system-gsm.patch
Patch1: libsndfile-1.0.25-zerodivfix.patch
Patch2: revert.patch
Patch3: libsndfile-1.0.28-flacbufovfl.patch
Patch4: libsndfile-1.0.29-cve2017_6892.patch
Patch5: libsndfile-1.0.28-cve2017_12562.patch
Patch9000: libsndfile_1.0.25_CVE-2017-14245-CVE-2017-14246.patch
Patch9001: libsndfile-CVE-2018-13139.patch
Patch9002: libsndfile-CVE-2019-3832.patch
Patch9003: CVE-2018-19662.patch
%description
Libsndfile is a C library for reading and writing files containing
sampled sound such as MS Windows WAV and the Apple/SGI AIFF format
through one standard library interface.
%package devel
Summary: Development package for libsndfile
Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig
%description devel
The development package for libsndfile.
%package utils
Summary: command line utilities for libsndfile
Requires: %{name} = %{version}-%{release}
%description utils
The command line utilities for libsndfile.
%package utils-help
Summary: Help files for %{name}-utils
BuildArch: noarch
%description utils-help
Help files for %{name}-utils.
%prep
%autosetup -n %{name}-%{version} -p1
rm -r src/GSM610
%build
autoreconf -I M4 -fiv
%configure \
--disable-dependency-tracking \
--enable-sqlite \
--enable-alsa \
--enable-largefile \
--disable-static
%disable_rpath
%make_build
%install
%make_install
rm -rf __docs
mkdir __docs
cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
mv %{buildroot}%{_includedir}/sndfile.h \
%{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
cat > %{buildroot}%{_includedir}/sndfile.h <<EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "sndfile-32.h"
#elif __WORDSIZE == 64
# include "sndfile-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
EOF
%check
LD_LIBRARY_PATH=$PWD/src/.libs make check
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%{_libdir}/%{name}.so.*
%doc AUTHORS README NEWS
%license COPYING
%files utils
%{_bindir}/sndfile-cmp
%{_bindir}/sndfile-concat
%{_bindir}/sndfile-convert
%{_bindir}/sndfile-deinterleave
%{_bindir}/sndfile-info
%{_bindir}/sndfile-interleave
%{_bindir}/sndfile-metadata-get
%{_bindir}/sndfile-metadata-set
%{_bindir}/sndfile-play
%{_bindir}/sndfile-regtest
%{_bindir}/sndfile-salvage
%exclude %{_bindir}/sndfile-jackplay
%files devel
%{_includedir}/sndfile.h
%{_includedir}/sndfile.hh
%{_includedir}/sndfile-%{__isa_bits}.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/sndfile.pc
%doc __docs ChangeLog
%exclude %{_libdir}/*.la
%files utils-help
%{_mandir}/man1/sndfile-cmp.1*
%{_mandir}/man1/sndfile-concat.1*
%{_mandir}/man1/sndfile-convert.1*
%{_mandir}/man1/sndfile-deinterleave.1*
%{_mandir}/man1/sndfile-info.1*
%{_mandir}/man1/sndfile-interleave.1*
%{_mandir}/man1/sndfile-metadata-get.1*
%{_mandir}/man1/sndfile-metadata-set.1*
%{_mandir}/man1/sndfile-play.1*
%{_mandir}/man1/sndfile-salvage.1*
%changelog
* Sat Apr 06 2019 luochunsheng<luochunsheng@huawei.com> - 1.0.28-13
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:remove sensitive information
* Thu Apr 04 2019 liuqianya<liuqianya@huawei.com> - 1.0.28-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix CVE-2018-19662
* Fri Mar 29 2019 zhangwenlong<zhangwenlong13@huawei.com> - 1.0.28-11
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix CVE-2019-3832
* Wed Feb 13 2019 cangyi<cangyi@huawei.com> - 1.0.28-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:sync
* Mon Sep 10 2018 openEuler Buildteam <buildteam@openeuler.org> -1.0.28-9
- Package init