]>
Commit | Line | Data |
---|---|---|
e991aa6f | 1 | # TODO: |
e991aa6f | 2 | # - who needs sndfile-regtest? |
19550c7f KK |
3 | # |
4 | # Conditional build: | |
5e84fc21 JB |
5 | %bcond_with regtest # sndfile-regtest program |
6 | %bcond_without octave # octave binding | |
7 | %bcond_without static_libs # static library | |
8 | %bcond_without tests # unit tests | |
19550c7f | 9 | # |
1dcb9798 | 10 | Summary: C library for reading and writing files containing sampled sound |
99339b5d | 11 | Summary(pl.UTF-8): Biblioteka obsługi plików dźwiękowych |
1dcb9798 | 12 | Name: libsndfile |
10167a66 | 13 | Version: 1.2.2 |
8abbe919 | 14 | Release: 1 |
a438ce96 | 15 | License: LGPL v2.1+ |
8b67e6cc | 16 | Group: Libraries |
8abbe919 | 17 | #Source0Download: https://github.com/libsndfile/libsndfile/releases |
e5164f5a JP |
18 | Source0: https://github.com/libsndfile/libsndfile/releases/download/%{version}/%{name}-%{version}.tar.xz |
19 | # Source0-md5: 04e2e6f726da7c5dc87f8cf72f250d04 | |
02b014db | 20 | Patch0: octave32.patch |
f967ffbb | 21 | URL: http://www.mega-nerd.com/libsndfile/ |
19550c7f | 22 | BuildRequires: alsa-lib-devel |
8abbe919 | 23 | BuildRequires: autoconf >= 2.69 |
5e84fc21 | 24 | %{?with_tests:BuildRequires: autogen} |
8abbe919 | 25 | BuildRequires: automake >= 1:1.14 |
1a20fc4f | 26 | BuildRequires: flac-devel >= 1.3.1 |
9bec58c8 | 27 | BuildRequires: gcc-fortran |
8abbe919 JB |
28 | BuildRequires: lame-libs-devel |
29 | BuildRequires: libmpg123-devel >= 1.25.10 | |
30 | BuildRequires: libogg-devel >= 2:1.3.0 | |
55badcef | 31 | %{?with_tests:BuildRequires: libstdc++-devel} |
8a1a5ba7 | 32 | BuildRequires: libtool >= 2:2 |
4f0a289c | 33 | BuildRequires: libvorbis-devel >= 1:1.2.3 |
1a20fc4f | 34 | %{?with_octave:BuildRequires: octave-devel >= 2:3} |
8abbe919 | 35 | BuildRequires: opus-devel >= 1.1 |
19550c7f | 36 | BuildRequires: pkgconfig |
55badcef | 37 | BuildRequires: sed >= 4.0 |
4f0a289c | 38 | %{?with_regtest:BuildRequires: sqlite3-devel >= 3.2} |
e5164f5a JP |
39 | BuildRequires: tar >= 1:1.22 |
40 | BuildRequires: xz | |
1a20fc4f | 41 | Requires: flac >= 1.3.1 |
8abbe919 JB |
42 | Requires: libmpg123 >= 1.25.10 |
43 | Requires: libogg >= 2:1.3.0 | |
7005f73b | 44 | Requires: libvorbis >= 1:1.2.3 |
8abbe919 | 45 | Requires: opus >= 1.1 |
3d5577b2 | 46 | Obsoletes: libsndfile1 |
ae214341 | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1dcb9798 AM |
48 | |
49 | %description | |
a6cdcff3 | 50 | Libsndfile is a C library for reading and writing files containing |
51 | sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) | |
52 | through one standard library interface. | |
1dcb9798 | 53 | |
66b8034c JR |
54 | %description -l pl.UTF-8 |
55 | Libsndfile to biblioteką napisaną w C, służąca do czytania i | |
56 | zapisywania plików zawierających zsamplowany dźwięk (np. w formacie MS | |
a6cdcff3 | 57 | Windows WAV czy Apple/SGI AIFF) poprzez jednolity, standardowy |
58 | interfejs. | |
0ee4787d | 59 | |
1dcb9798 AM |
60 | %package devel |
61 | Summary: libsndfile header files and development documentation | |
99339b5d | 62 | Summary(pl.UTF-8): Pliki nagłówkowe oraz dokumentacja do libsndfile |
1dcb9798 | 63 | Group: Development/Libraries |
f967ffbb | 64 | Requires: %{name} = %{version}-%{release} |
1a20fc4f | 65 | Requires: flac-devel >= 1.3.1 |
8abbe919 JB |
66 | Requires: lame-libs-devel |
67 | Requires: libmpg123-devel >= 1.25.10 | |
68 | Requires: libogg-devel >= 2:1.3.0 | |
7005f73b | 69 | Requires: libvorbis-devel >= 1:1.2.3 |
8abbe919 | 70 | Requires: opus-devel >= 1.1 |
3d5577b2 | 71 | Obsoletes: libsndfile1-devel |
1dcb9798 AM |
72 | |
73 | %description devel | |
74 | Header files and development documentation for libsndfile. | |
75 | ||
66b8034c JR |
76 | %description devel -l pl.UTF-8 |
77 | Pliki nagłówkowe oraz dokumentacja do biblioteki libsndfile. | |
1dcb9798 AM |
78 | |
79 | %package static | |
80 | Summary: libsndfile static libraries | |
99339b5d | 81 | Summary(pl.UTF-8): Biblioteki statyczne libsndfile |
1dcb9798 | 82 | Group: Development/Libraries |
f967ffbb | 83 | Requires: %{name}-devel = %{version}-%{release} |
1dcb9798 AM |
84 | |
85 | %description static | |
86 | libsndfile static libraries. | |
87 | ||
66b8034c | 88 | %description static -l pl.UTF-8 |
1dcb9798 AM |
89 | Biblioteki statyczne libsndfile. |
90 | ||
e991aa6f SS |
91 | %package progs |
92 | Summary: libsndfile utility programs | |
93 | Summary(pl.UTF-8): Narzędzia korzystające z biblioteki libsndfile | |
9549b058 | 94 | Group: Applications/Sound |
373e2ff9 | 95 | Requires: %{name} = %{version}-%{release} |
e991aa6f SS |
96 | |
97 | %description progs | |
98 | libsndfile utility programs: | |
4f0a289c JB |
99 | - sndfile-convert - convert a sound files from one format to another |
100 | - sndfile-info - display information about a sound file | |
101 | - sndfile-play - play a sound file | |
e991aa6f SS |
102 | |
103 | %description progs -l pl.UTF-8 | |
104 | Narzędzia z biblioteki libsndfile: | |
105 | - sndfile-convert - kowertertuje pliki dźwiękowe | |
106 | - sndfile-info - wyświetla informacje o pliku dźwiękowym | |
107 | - sndfile-play - odtwarza pliki dźwiękowe | |
108 | ||
7005f73b JB |
109 | %package -n octave-sndfile |
110 | Summary: sndfile module for Octave | |
111 | Summary(pl.UTF-8): Moduł sndfile dla Octave | |
112 | Group: Applications/Math | |
113 | Requires: %{name} = %{version}-%{release} | |
1a20fc4f | 114 | Requires: octave >= 2:3 |
10167a66 | 115 | Obsoletes: libsndfile-octave < 1.0.23 |
7005f73b JB |
116 | |
117 | %description -n octave-sndfile | |
118 | A couple of script files for loading, saving, and playing sound files | |
119 | from within Octave. | |
120 | ||
121 | %description -n octave-sndfile -l pl.UTF-8 | |
122 | Kilka skryptów Octave do ładowania, zapisywania i odtwarzania plików | |
123 | dźwiękowych. | |
124 | ||
1dcb9798 AM |
125 | %prep |
126 | %setup -q | |
02b014db | 127 | %patch0 -p1 |
1dcb9798 | 128 | |
55badcef KK |
129 | %if %{without tests} |
130 | %{__sed} -i 's, tests$,,' Makefile.am | |
131 | %endif | |
132 | ||
1dcb9798 | 133 | %build |
92de6080 | 134 | %{__libtoolize} |
8abbe919 | 135 | %{__aclocal} -I m4 |
4a72fafe | 136 | %{__autoconf} |
8abbe919 | 137 | %{__autoheader} |
4a72fafe | 138 | %{__automake} |
19550c7f | 139 | %configure \ |
8a1a5ba7 | 140 | %{!?with_octave:--disable-octave} \ |
c0533da4 JB |
141 | --disable-silent-rules \ |
142 | %{!?with_regtest:--disable-sqlite} \ | |
8abbe919 | 143 | %{?with_static_libs:--enable-static} |
c0533da4 JB |
144 | |
145 | %{__make} | |
19550c7f | 146 | |
c0533da4 | 147 | %{?with_tests:%{__make} test} |
1dcb9798 AM |
148 | |
149 | %install | |
150 | rm -rf $RPM_BUILD_ROOT | |
0ee4787d | 151 | |
9c3ecd17 PG |
152 | %{__make} install \ |
153 | DESTDIR=$RPM_BUILD_ROOT | |
0ee4787d | 154 | |
1a20fc4f JB |
155 | # packaged as %doc |
156 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libsndfile | |
8c0d9fea | 157 | |
1dcb9798 AM |
158 | %clean |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
161 | %post -p /sbin/ldconfig | |
162 | %postun -p /sbin/ldconfig | |
163 | ||
164 | %files | |
165 | %defattr(644,root,root,755) | |
8abbe919 | 166 | %doc AUTHORS CHANGELOG.md ChangeLog NEWS.OLD README SECURITY.md |
69842c69 JB |
167 | %attr(755,root,root) %{_libdir}/libsndfile.so.*.*.* |
168 | %attr(755,root,root) %ghost %{_libdir}/libsndfile.so.1 | |
1dcb9798 AM |
169 | |
170 | %files devel | |
171 | %defattr(644,root,root,755) | |
8abbe919 | 172 | %doc docs/* |
92edf427 JB |
173 | %attr(755,root,root) %{_libdir}/libsndfile.so |
174 | %{_libdir}/libsndfile.la | |
175 | %{_includedir}/sndfile.h* | |
176 | %{_pkgconfigdir}/sndfile.pc | |
1dcb9798 | 177 | |
19550c7f | 178 | %if %{with static_libs} |
1dcb9798 | 179 | %files static |
a6cdcff3 | 180 | %defattr(644,root,root,755) |
92edf427 | 181 | %{_libdir}/libsndfile.a |
19550c7f | 182 | %endif |
bcbe612a | 183 | |
7005f73b JB |
184 | %files progs |
185 | %defattr(644,root,root,755) | |
186 | %attr(755,root,root) %{_bindir}/sndfile-* | |
187 | %{_mandir}/man1/sndfile-*.1* | |
188 | ||
4f0a289c | 189 | %if %{with octave} |
7005f73b | 190 | %files -n octave-sndfile |
bcbe612a | 191 | %defattr(644,root,root,755) |
69842c69 JB |
192 | %{_datadir}/octave/site/m/sndfile_*.m |
193 | %dir %{_libdir}/octave/*/site/oct/*/sndfile | |
194 | %{_libdir}/octave/*/site/oct/*/sndfile/PKG_ADD | |
195 | %attr(755,root,root) %{_libdir}/octave/*/site/oct/*/sndfile/sndfile.oct | |
4f0a289c | 196 | %endif |