source: spec/trunk/SPECS/libsndfile.spec@ 1750

Last change on this file since 1750 was 1750, checked in by tellie, 5 years ago

spec: libsndffile: Release version 1.0.31-1

File size: 4.9 KB
Line 
1Summary: Library for reading and writing sound files
2Name: libsndfile
3Version: 1.0.31
4Release: 1%{?dist}
5License: LGPLv2+ and GPLv2+ and BSD
6URL: http://www.mega-nerd.com/libsndfile/
7%if !0%{?os2_version}
8Source0: 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
12Patch1: libsndfile-1.0.25-zerodivfix.patch
13%if !0%{?os2_version}
14Patch0: libsndfile-1.0.25-system-gsm.patch
15Patch2: revert.patch
16Patch3: libsndfile-1.0.28-flacbufovfl.patch
17Patch4: libsndfile-1.0.29-cve2017_6892.patch
18# from upstream, for <= 1.0.28, rhbz#1483140
19Patch5: libsndfile-1.0.28-cve2017_12562.patch
20libsndfile-1.0.29-cve2017_6892.patch
21%endif
22
23%if !0%{?os2_version}
24BuildRequires: gcc-c++
25BuildRequires: alsa-lib-devel
26BuildRequires: gsm-devel
27%else
28BuildRequires: gcc
29BuildRequires: flac-devel
30BuildRequires: gcc
31BuildRequires: libogg-devel
32BuildRequires: libvorbis-devel
33BuildRequires: pkgconfig
34BuildRequires: sqlite-devel
35BuildRequires: libtool
36BuildRequires: make
37%endif
38
39%description
40libsndfile is a C library for reading and writing sound files such as
41AIFF, AU, WAV, and others through one standard interface. It can
42currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
4364-bit floating point WAV files and a number of compressed formats. It
44compiles and runs on *nix, MacOS, and Win32.
45
46
47%package devel
48Summary: Development files for libsndfile
49Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig
50
51
52%description devel
53libsndfile is a C library for reading and writing sound files such as
54AIFF, AU, WAV, and others through one standard interface.
55This package contains files needed to develop with libsndfile.
56
57
58%package utils
59Summary: Command Line Utilities for libsndfile
60Requires: %{name} = %{version}-%{release}
61
62
63%description utils
64libsndfile is a C library for reading and writing sound files such as
65AIFF, AU, WAV, and others through one standard interface.
66This 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
86mkdir builder
87cd builder
88export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
89export 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 ..
97make %{?_smp_mflags}
98
99
100%install
101%if !0%{?os2_version}
102make install DESTDIR=$RPM_BUILD_ROOT
103%else
104make install INSTALL_ROOT=%{buildroot} DESTDIR=$RPM_BUILD_ROOT -C builder
105%endif
106rm -rf __docs
107mkdir __docs
108cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
109rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
110find %{buildroot} -type f -name "*.la" -delete
111# fix multilib issues
112mv %{buildroot}%{_includedir}/sndfile.h \
113 %{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
114
115cat > %{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
125EOF
126
127%if !0%{?os2_version}
128%if 0%{?rhel} != 0
129rm -f %{buildroot}%{_bindir}/sndfile-jackplay
130%endif
131%endif
132
133%check
134%if !0%{?os2_version}
135LD_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
Note: See TracBrowser for help on using the repository browser.