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