| 1 | Summary: Library for reading and writing sound files
|
|---|
| 2 | Name: libsndfile
|
|---|
| 3 | Version: 1.0.31
|
|---|
| 4 | Release: 1%{?dist}
|
|---|
| 5 | License: LGPLv2+ and GPLv2+ and BSD
|
|---|
| 6 | URL: http://www.mega-nerd.com/libsndfile/
|
|---|
| 7 | %if !0%{?os2_version}
|
|---|
| 8 | Source0: http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz
|
|---|
| 9 | %else
|
|---|
| 10 | %scm_source github http://github.com/TeLLie/%{name}-os2 %{version}-os2
|
|---|
| 11 | %endif
|
|---|
| 12 | Patch1: libsndfile-1.0.25-zerodivfix.patch
|
|---|
| 13 | %if !0%{?os2_version}
|
|---|
| 14 | Patch0: libsndfile-1.0.25-system-gsm.patch
|
|---|
| 15 | Patch2: revert.patch
|
|---|
| 16 | Patch3: libsndfile-1.0.28-flacbufovfl.patch
|
|---|
| 17 | Patch4: libsndfile-1.0.29-cve2017_6892.patch
|
|---|
| 18 | # from upstream, for <= 1.0.28, rhbz#1483140
|
|---|
| 19 | Patch5: libsndfile-1.0.28-cve2017_12562.patch
|
|---|
| 20 | libsndfile-1.0.29-cve2017_6892.patch
|
|---|
| 21 | %endif
|
|---|
| 22 |
|
|---|
| 23 | %if !0%{?os2_version}
|
|---|
| 24 | BuildRequires: gcc-c++
|
|---|
| 25 | BuildRequires: alsa-lib-devel
|
|---|
| 26 | BuildRequires: gsm-devel
|
|---|
| 27 | %else
|
|---|
| 28 | BuildRequires: gcc
|
|---|
| 29 | BuildRequires: flac-devel
|
|---|
| 30 | BuildRequires: gcc
|
|---|
| 31 | BuildRequires: libogg-devel
|
|---|
| 32 | BuildRequires: libvorbis-devel
|
|---|
| 33 | BuildRequires: pkgconfig
|
|---|
| 34 | BuildRequires: sqlite-devel
|
|---|
| 35 | BuildRequires: libtool
|
|---|
| 36 | BuildRequires: make
|
|---|
| 37 | %endif
|
|---|
| 38 |
|
|---|
| 39 | %description
|
|---|
| 40 | libsndfile is a C library for reading and writing sound files such as
|
|---|
| 41 | AIFF, AU, WAV, and others through one standard interface. It can
|
|---|
| 42 | currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
|
|---|
| 43 | 64-bit floating point WAV files and a number of compressed formats. It
|
|---|
| 44 | compiles and runs on *nix, MacOS, and Win32.
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 | %package devel
|
|---|
| 48 | Summary: Development files for libsndfile
|
|---|
| 49 | Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | %description devel
|
|---|
| 53 | libsndfile is a C library for reading and writing sound files such as
|
|---|
| 54 | AIFF, AU, WAV, and others through one standard interface.
|
|---|
| 55 | This package contains files needed to develop with libsndfile.
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 | %package utils
|
|---|
| 59 | Summary: Command Line Utilities for libsndfile
|
|---|
| 60 | Requires: %{name} = %{version}-%{release}
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | %description utils
|
|---|
| 64 | libsndfile is a C library for reading and writing sound files such as
|
|---|
| 65 | AIFF, AU, WAV, and others through one standard interface.
|
|---|
| 66 | This package contains command line utilities for libsndfile.
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 | %prep
|
|---|
| 70 | %if !0%{?os2_version}
|
|---|
| 71 | %setup -q
|
|---|
| 72 | %else
|
|---|
| 73 | %scm_setup
|
|---|
| 74 | %endif
|
|---|
| 75 | %patch1 -p1 -b .zerodivfix
|
|---|
| 76 | %if !0%{?os2_version}
|
|---|
| 77 | %patch0 -p1 -b .systemgsm
|
|---|
| 78 | %patch2 -p1 -b .revert
|
|---|
| 79 | %patch3 -p1 -b .flacbufovfl
|
|---|
| 80 | %patch4 -p1 -b .cve2017_6892
|
|---|
| 81 | %patch5 -p1 -b .cve2017_12562
|
|---|
| 82 | %endif
|
|---|
| 83 | #rm -r src/GSM610
|
|---|
| 84 |
|
|---|
| 85 | %build
|
|---|
| 86 | mkdir builder
|
|---|
| 87 | cd builder
|
|---|
| 88 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 89 | export LIBS="-lcx"
|
|---|
| 90 | %cmake -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \
|
|---|
| 91 | -DCMAKE_SKIP_RPATH:BOOL=YES \
|
|---|
| 92 | -DOS2_USE_CXX_EMXEXP=ON \
|
|---|
| 93 | -DCMAKE_BUILD_TYPE=Release \
|
|---|
| 94 | -Wno-dev \
|
|---|
| 95 | -DBUILD_TESTING=ON \
|
|---|
| 96 | ..
|
|---|
| 97 | make %{?_smp_mflags}
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 | %install
|
|---|
| 101 | %if !0%{?os2_version}
|
|---|
| 102 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 103 | %else
|
|---|
| 104 | make install INSTALL_ROOT=%{buildroot} DESTDIR=$RPM_BUILD_ROOT -C builder
|
|---|
| 105 | %endif
|
|---|
| 106 | rm -rf __docs
|
|---|
| 107 | mkdir __docs
|
|---|
| 108 | cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
|
|---|
| 109 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
|
|---|
| 110 | find %{buildroot} -type f -name "*.la" -delete
|
|---|
| 111 | # fix multilib issues
|
|---|
| 112 | mv %{buildroot}%{_includedir}/sndfile.h \
|
|---|
| 113 | %{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
|
|---|
| 114 |
|
|---|
| 115 | cat > %{buildroot}%{_includedir}/sndfile.h <<EOF
|
|---|
| 116 | #include <bits/wordsize.h>
|
|---|
| 117 |
|
|---|
| 118 | #if __WORDSIZE == 32
|
|---|
| 119 | # include "sndfile-32.h"
|
|---|
| 120 | #elif __WORDSIZE == 64
|
|---|
| 121 | # include "sndfile-64.h"
|
|---|
| 122 | #else
|
|---|
| 123 | # error "unexpected value for __WORDSIZE macro"
|
|---|
| 124 | #endif
|
|---|
| 125 | EOF
|
|---|
| 126 |
|
|---|
| 127 | %if !0%{?os2_version}
|
|---|
| 128 | %if 0%{?rhel} != 0
|
|---|
| 129 | rm -f %{buildroot}%{_bindir}/sndfile-jackplay
|
|---|
| 130 | %endif
|
|---|
| 131 | %endif
|
|---|
| 132 |
|
|---|
| 133 | %check
|
|---|
| 134 | %if !0%{?os2_version}
|
|---|
| 135 | LD_LIBRARY_PATH=$PWD/src/.libs make check
|
|---|
| 136 | %endif
|
|---|
| 137 |
|
|---|
| 138 | %if !0%{?os2_version}
|
|---|
| 139 | %ldconfig_scriptlets
|
|---|
| 140 | %endif
|
|---|
| 141 |
|
|---|
| 142 | %files
|
|---|
| 143 | %{!?_licensedir:%global license %%doc}
|
|---|
| 144 | %license COPYING
|
|---|
| 145 | %doc AUTHORS README NEWS
|
|---|
| 146 | %if !0%{?os2_version}
|
|---|
| 147 | %{_libdir}/%{name}.so.*
|
|---|
| 148 | %else
|
|---|
| 149 | %{_libdir}/*.dll
|
|---|
| 150 | %endif
|
|---|
| 151 |
|
|---|
| 152 | %files utils
|
|---|
| 153 | %if !0%{?os2_version}
|
|---|
| 154 | %{_bindir}/sndfile-cmp
|
|---|
| 155 | %{_bindir}/sndfile-concat
|
|---|
| 156 | %{_bindir}/sndfile-convert
|
|---|
| 157 | %{_bindir}/sndfile-deinterleave
|
|---|
| 158 | %{_bindir}/sndfile-info
|
|---|
| 159 | %{_bindir}/sndfile-interleave
|
|---|
| 160 | %{_bindir}/sndfile-metadata-get
|
|---|
| 161 | %{_bindir}/sndfile-metadata-set
|
|---|
| 162 | %{_bindir}/sndfile-play
|
|---|
| 163 | %{_bindir}/sndfile-regtest
|
|---|
| 164 | %{_bindir}/sndfile-salvage
|
|---|
| 165 | %else
|
|---|
| 166 | %{_bindir}/sndfile-*.exe
|
|---|
| 167 | %{_mandir}/man1/sndfile-cmp.1*
|
|---|
| 168 | %{_mandir}/man1/sndfile-concat.1*
|
|---|
| 169 | %{_mandir}/man1/sndfile-convert.1*
|
|---|
| 170 | %{_mandir}/man1/sndfile-deinterleave.1*
|
|---|
| 171 | %{_mandir}/man1/sndfile-info.1*
|
|---|
| 172 | %{_mandir}/man1/sndfile-interleave.1*
|
|---|
| 173 | %{_mandir}/man1/sndfile-metadata-get.1*
|
|---|
| 174 | %{_mandir}/man1/sndfile-metadata-set.1*
|
|---|
| 175 | %{_mandir}/man1/sndfile-play.1*
|
|---|
| 176 | %{_mandir}/man1/sndfile-salvage.1*
|
|---|
| 177 | %endif
|
|---|
| 178 |
|
|---|
| 179 | %files devel
|
|---|
| 180 | %doc __docs ChangeLog
|
|---|
| 181 | %{_includedir}/sndfile.h
|
|---|
| 182 | %{_includedir}/sndfile.hh
|
|---|
| 183 | %{_includedir}/sndfile-%{__isa_bits}.h
|
|---|
| 184 | %if !0%{?os2_version}
|
|---|
| 185 | %{_libdir}/%{name}.so
|
|---|
| 186 | %else
|
|---|
| 187 | %{_libdir}/*.a
|
|---|
| 188 | %{_libdir}/pkgconfig/sndfile.pc
|
|---|
| 189 | %dir %{_libdir}/cmake/SndFile
|
|---|
| 190 | %{_libdir}/cmake/SndFile/SndFileTargets-release.cmake
|
|---|
| 191 | %{_libdir}/cmake/SndFile/SndFileTargets.cmake
|
|---|
| 192 | %{_libdir}/cmake/SndFile/SndFileConfig.cmake
|
|---|
| 193 | %{_libdir}/cmake/SndFile/SndFileConfigVersion.cmake
|
|---|
| 194 | %endif
|
|---|
| 195 |
|
|---|
| 196 | %changelog
|
|---|
| 197 | * Tue Jan 26 2021 Elbert Pol <elbert.pol@gmail.com> - 1.0.31-1
|
|---|
| 198 | - First rpm version for OS2
|
|---|
| 199 | - Update to latest version
|
|---|