]>
Commit | Line | Data |
---|---|---|
53f5def7 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with sse2 # SSE2 support | |
4 | ||
5 | %ifarch %{x8664} x32 | |
6 | %define with_sse2 1 | |
7 | %endif | |
4778b297 | 8 | Summary: C++ library for sample rate conversion of audio signals |
9090d61d | 9 | Summary(pl.UTF-8): Biblioteka C++ do konwersji szybkości próbkowania sygnałów dźwiękowych |
4778b297 | 10 | Name: zita-resampler |
6c032bd5 | 11 | Version: 1.11.2 |
50884a92 | 12 | Release: 1 |
4778b297 JK |
13 | License: GPL v3+ |
14 | Group: Libraries | |
fddbb544 | 15 | Source0: http://kokkinizita.linuxaudio.org/linuxaudio/downloads/%{name}-%{version}.tar.xz |
6c032bd5 | 16 | # Source0-md5: da0373a02f0d1ba0a15a1fd270a177cd |
4778b297 | 17 | URL: http://kokkinizita.linuxaudio.org/linuxaudio/ |
9090d61d JB |
18 | BuildRequires: libsndfile-devel |
19 | BuildRequires: libstdc++-devel | |
53f5def7 | 20 | BuildRequires: sed >= 4.0 |
fddbb544 JB |
21 | BuildRequires: tar >= 1:1.22 |
22 | BuildRequires: xz | |
4778b297 JK |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | Zita-resampler is a C++ library for sample rate conversion of audio | |
27 | signals. | |
28 | ||
9090d61d JB |
29 | %description -l pl.UTF-8 |
30 | Zita-resampler to biblioteka C++ do konwersji szybkości próbkowania | |
31 | sygnałów dźwiękowych. | |
32 | ||
4778b297 JK |
33 | %package devel |
34 | Summary: Header files for %{name} library | |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
9090d61d | 38 | Requires: libstdc++-devel |
4778b297 JK |
39 | |
40 | %description devel | |
41 | Header files for %{name} library. | |
42 | ||
43 | %description devel -l pl.UTF-8 | |
44 | Pliki nagłówkowe biblioteki %{name}. | |
45 | ||
46 | %package apps | |
47 | Summary: Example applications using the %{name} library | |
9090d61d | 48 | Summary(pl.UTF-8): Przykładowe aplikacje wykorzystujące bibliotekę %{name} |
4778b297 JK |
49 | Group: Applications/Sound |
50 | Requires: %{name} = %{version}-%{release} | |
51 | ||
52 | %description apps | |
53 | Example applications using the %{name} library. | |
54 | ||
9090d61d JB |
55 | %description apps -l pl.UTF-8 |
56 | Przykładowe aplikacje wykorzystujące bibliotekę %{name}. | |
57 | ||
4778b297 JK |
58 | %prep |
59 | %setup -q | |
60 | ||
53f5def7 JB |
61 | %if %{without sse2} |
62 | %{__sed} -i -e '/-DENABLE_SSE2/d' source/Makefile | |
63 | %endif | |
64 | ||
4778b297 | 65 | %build |
4778b297 JK |
66 | CPPFLAGS="%{rpmcppflags}" \ |
67 | LDFLAGS="%{rpmldflags}" \ | |
9090d61d JB |
68 | %{__make} -C source \ |
69 | CXX="%{__cxx}" \ | |
53f5def7 | 70 | CXXFLAGS="%{rpmcxxflags} -fPIC -Wall -ffast-math%{?with_sse2: -msse2}" |
4778b297 | 71 | |
9090d61d | 72 | ln -s "$(basename source/libzita-resampler.so.*.*.*)" source/libzita-resampler.so |
4778b297 | 73 | |
9090d61d JB |
74 | CPPFLAGS="-I../source %{rpmcppflags}" \ |
75 | LDFLAGS="-L../source %{rpmldflags}" \ | |
76 | %{__make} -C apps \ | |
53f5def7 | 77 | CXX="%{__cxx}" \ |
9090d61d | 78 | CXXFLAGS="%{rpmcxxflags} -Wall -ffast-math" |
4778b297 JK |
79 | |
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
9090d61d | 82 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir},%{_mandir}/man1} |
4778b297 | 83 | |
9090d61d | 84 | cp -p source/lib%{name}.so.1.* $RPM_BUILD_ROOT%{_libdir} |
4778b297 | 85 | /sbin/ldconfig -nN $RPM_BUILD_ROOT%{_libdir} |
9090d61d JB |
86 | ln -s "$(basename $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.1.*)" $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so |
87 | cp -pr source/%{name} $RPM_BUILD_ROOT%{_includedir} | |
4778b297 JK |
88 | |
89 | %{__make} -C apps install \ | |
90 | PREFIX="%{_prefix}" \ | |
91 | DESTDIR="$RPM_BUILD_ROOT" | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post -p /sbin/ldconfig | |
97 | %postun -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc AUTHORS README | |
9090d61d JB |
102 | %attr(755,root,root) %{_libdir}/libzita-resampler.so.*.*.* |
103 | %attr(755,root,root) %ghost %{_libdir}/libzita-resampler.so.1 | |
4778b297 JK |
104 | |
105 | %files devel | |
106 | %defattr(644,root,root,755) | |
9090d61d JB |
107 | %attr(755,root,root) %{_libdir}/libzita-resampler.so |
108 | %{_includedir}/zita-resampler | |
4778b297 JK |
109 | |
110 | %files apps | |
111 | %defattr(644,root,root,755) | |
9090d61d JB |
112 | %attr(755,root,root) %{_bindir}/zresample |
113 | %attr(755,root,root) %{_bindir}/zretune | |
114 | %{_mandir}/man1/zresample.1* | |
115 | %{_mandir}/man1/zretune.1* |