]> git.pld-linux.org Git - packages/webrtc-audio-processing1.git/blob - webrtc-audio-processing1.spec
macros for %ninja*
[packages/webrtc-audio-processing1.git] / webrtc-audio-processing1.spec
1 # NOTE:
2 # f.d.o source is meant to be a more Linux packaging friendly copy of the
3 # AudioProcessing module from the WebRTC[1] project. The ideal case is that we
4 # make no changes to the code to make tracking upstream code easy.
5 # [1] http://code.google.com/p/webrtc/
6 #
7 # Conditional build:
8 %bcond_without  neon            # ARM NEON instructions
9 %bcond_with     sse2            # SSE2 instructions
10
11 %ifnarch armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl
12 %undefine       with_neon
13 %endif
14 %ifarch pentium4 %{x8664} x32
15 %define         with_sse2       1
16 %endif
17
18 Summary:        WebRTC Audio Processing library
19 Summary(pl.UTF-8):      Biblioteka WebRTC Audio Processing
20 Name:           webrtc-audio-processing1
21 Version:        1.0
22 Release:        5
23 License:        BSD
24 Group:          Libraries
25 Source0:        https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-%{version}.tar.gz
26 # Source0-md5:  8ee1b2f3e615c6c2024951c559a9913a
27 Patch0:         %{name}-abseil.patch
28 Patch1:         %{name}-nosimd.patch
29 Patch2:         cxx17.patch
30 URL:            https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
31 BuildRequires:  abseil-cpp-devel >= 20200923
32 BuildRequires:  libstdc++-devel >= 6:5
33 BuildRequires:  meson >= 0.54
34 BuildRequires:  ninja >= 1.5
35 BuildRequires:  rpmbuild(macros) >= 1.736
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 WebRTC is an open source project that enables web browsers with
40 Real-Time Communications (RTC) capabilities via simple Javascript
41 APIs. The WebRTC components have been optimized to best serve this
42 purpose. WebRTC implements the W3C's proposal for video conferencing
43 on the web.
44
45 %description -l pl.UTF-8
46 WebRTC to projekt o otwartych źródłach dodający obsługę komunikacji
47 w czasie rzeczywistym (RTC - Real-Time Communications) poprzez proste
48 API JavaScriptu. Komponenty WebRTC zostały zoptymalizowane, aby jak
49 najlepiej sprawdzały się w tym zastosowaniu. WebRTC implementuje
50 propozycje W3C do wideokonferencji w sieci.
51
52 %package devel
53 Summary:        Header files for WebRTC Audio Processing library
54 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki WebRTC Audio Processing
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       abseil-cpp-devel >= 20200923
58 Requires:       libstdc++-devel >= 6:5
59
60 %description devel
61 This package contains the header files needed to develop programs
62 which make use of WebRTC Audio Processing library.
63
64 %description devel -l pl.UTF-8
65 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
66 wykorzystujących bibliotekę WebRTC Audio Processing.
67
68 %package static
69 Summary:        Static WebRTC Audio Processing library
70 Summary(pl.UTF-8):      Biblioteka statyczna WebRTC Audio Processing
71 Group:          Development/Libraries
72 Requires:       %{name}-devel = %{version}-%{release}
73
74 %description static
75 Static WebRTC Audio Processing library.
76
77 %description static -l pl.UTF-8
78 Biblioteka statyczna WebRTC Audio Processing.
79
80 %prep
81 %setup -q -n webrtc-audio-processing-%{version}
82 %patch0 -p1
83 %patch1 -p1
84 %patch2 -p1
85
86 %ifarch %{ix86}
87 %if %{without sse2}
88 # add -DPFFFT_SIMD_DISABLE
89 %{__sed} -i -e 's/have_arm and not have_neon.*/& or true/' webrtc/third_party/pffft/meson.build
90 %endif
91 %endif
92
93 %build
94 %if %{with sse2}
95 CFLAGS="%{rpmcflags} -msse2"
96 CXXFLAGS="%{rpmcxxflags} -msse2"
97 %endif
98 %meson build \
99         -Dneon=%{?with_neon:runtime}%{!?with_neon:no}
100
101 %ninja_build -C build
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %ninja_install -C build
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post   -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
113
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS COPYING NEWS README.md webrtc/PATENTS
117 %attr(755,root,root) %{_libdir}/libwebrtc-audio-coding-1.so.0
118 %attr(755,root,root) %{_libdir}/libwebrtc-audio-processing-1.so.0
119
120 %files devel
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libwebrtc-audio-coding-1.so
123 %attr(755,root,root) %{_libdir}/libwebrtc-audio-processing-1.so
124 %{_includedir}/webrtc-audio-processing-1
125 %{_pkgconfigdir}/webrtc-audio-coding-1.pc
126 %{_pkgconfigdir}/webrtc-audio-processing-1.pc
127
128 %files static
129 %defattr(644,root,root,755)
130 %{_libdir}/libwebrtc-audio-coding-1.a
131 %{_libdir}/libwebrtc-audio-processing-1.a
This page took 0.07043 seconds and 3 git commands to generate.