]>
Commit | Line | Data |
---|---|---|
fafdac2c | 1 | # |
6033074b JK |
2 | # NOTE: the package is prepared mainly for Asterisk needs, so it is configured |
3 | # the way Asterisk wiki suggests: | |
4 | # https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject | |
fafdac2c | 5 | # |
6033074b JK |
6 | # If we have another package using this library we may need to change bcond |
7 | # defaults. | |
fafdac2c JK |
8 | # |
9 | # TODO: | |
10 | # - fix --with opencore_amr | |
11 | # - libresample.so conflicts with the libresample-devel package | |
12 | # | |
13 | ||
14 | # Conditional build: | |
6033074b | 15 | %bcond_with sound # enable sound support (AST wiki suggests disabling it) |
2f041963 JK |
16 | %bcond_with video # enable video support (AST wiki suggests disabling it) |
17 | %bcond_with resample # enable resample support (AST wiki suggests disabling it) | |
18 | %bcond_with opencore_amr # enable opencore-arm support (AST wiki suggests disabling it) | |
fafdac2c | 19 | |
fafdac2c JK |
20 | Summary: PJSIP - free and open source multimedia communication library |
21 | Name: pjproject | |
3c2bca3c | 22 | Version: 2.5.5 |
3ca848fd | 23 | Release: 3 |
fafdac2c JK |
24 | License: GPL v2+ |
25 | Group: Libraries | |
6033074b | 26 | Source0: http://www.pjsip.org/release/%{version}/%{name}-%{version}.tar.bz2 |
3c2bca3c | 27 | # Source0-md5: 183f7144b9aa238884243c0fc52ece36 |
7f66a9ac | 28 | Source1: config_site.h |
6033074b | 29 | Patch0: %{name}-ilbc-link.patch |
14efab78 JK |
30 | # patches from Asterisk |
31 | Patch100: 0001-r5397-pjsip_generic_array_max_count.patch | |
32 | Patch101: 0001-r5400-pjsip_tx_data_dec_ref.patch | |
33 | Patch102: 0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch | |
34 | Patch103: 0002-r5435-add-pjsip_inv_session-ref_cnt.patch | |
35 | Patch104: 0003-r5403-pjsip_IPV6_V6ONLY.patch | |
36 | Patch105: 0004-resolver.c-Prevent-SERVFAIL-from-marking-name-server.patch | |
37 | Patch106: 0005-Re-1969-Fix-crash-on-using-an-already-destroyed-SSL-.patch | |
fafdac2c JK |
38 | URL: http://www.pjsip.org/ |
39 | %{?with_video:BuildRequires: SDL2-devel} | |
40 | BuildRequires: SILK_SDK-devel | |
41 | BuildRequires: autoconf | |
42 | %{?with_video:BuildRequires: ffmpeg-devel} | |
43 | BuildRequires: libgsm-devel | |
44 | %{?with_video:BuildRequires: libv4l-devel} | |
45 | %{?with_opencore_amr:BuildRequires: opencore-amr-devel} | |
46 | BuildRequires: openssl-devel | |
47 | BuildRequires: pkgconfig | |
48 | %{?with_sound:BuildRequires: portaudio-devel} | |
49 | BuildRequires: python-modules | |
50 | BuildRequires: rpmbuild(macros) >= 1.583 | |
51 | BuildRequires: speex-devel | |
f98e9468 | 52 | BuildRequires: speexdsp-devel |
fafdac2c JK |
53 | BuildRequires: srtp-devel |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
56 | # dependency loop between libpjmedia-videodev.so and libpjmedia.so | |
57 | %define skip_post_check_so libpjmedia-videodev.so.* | |
58 | ||
c2a2909a JR |
59 | %ifarch x32 |
60 | %define libsuffix x86_64-pld-linux-gnux32 | |
61 | %else | |
fafdac2c | 62 | %define libsuffix %{_arch}-pld-linux-gnu |
c2a2909a | 63 | %endif |
fafdac2c JK |
64 | |
65 | %description | |
66 | PJSIP is a free and open source multimedia communication library | |
67 | written in C language implementing standard based protocols such as | |
68 | SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol | |
69 | (SIP) with rich multimedia framework and NAT traversal functionality | |
70 | into high level API that is portable and suitable for almost any type | |
71 | of systems ranging from desktops, embedded systems, to mobile | |
72 | handsets. | |
73 | ||
74 | PJSIP is both compact and feature rich. It supports audio, video, | |
75 | presence, and instant messaging, and has extensive documentation. | |
76 | PJSIP is very portable. On mobile devices, it abstracts system | |
77 | dependent features and in many cases is able to utilize the native | |
78 | multimedia capabilities of the device. | |
79 | ||
80 | %package devel | |
81 | Summary: Header files for %{name} library | |
82 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
83 | Group: Development/Libraries | |
84 | Requires: %{name} = %{version}-%{release} | |
2248208b | 85 | Requires: SILK_SDK-devel |
fafdac2c JK |
86 | |
87 | %description devel | |
88 | Header files for %{name} library. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Pliki nagłówkowe biblioteki %{name}. | |
92 | ||
93 | %package static | |
94 | Summary: Static %{name} library | |
95 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
96 | Group: Development/Libraries | |
97 | Requires: %{name}-devel = %{version}-%{release} | |
98 | ||
99 | %description static | |
100 | Static %{name} library. | |
101 | ||
102 | %description static -l pl.UTF-8 | |
103 | Statyczna biblioteka %{name}. | |
104 | ||
105 | %prep | |
6033074b | 106 | %setup -q |
fafdac2c | 107 | %patch0 -p1 |
fafdac2c | 108 | |
14efab78 JK |
109 | %patch100 -p1 |
110 | %patch101 -p1 | |
111 | %patch102 -p1 | |
112 | %patch103 -p1 | |
113 | %patch104 -p1 | |
114 | %patch105 -p1 | |
115 | %patch106 -p1 | |
116 | ||
7f66a9ac JK |
117 | cp -p %{SOURCE1} pjlib/include/pj/config_site.h |
118 | ||
fafdac2c JK |
119 | %build |
120 | %{__autoconf} -o configure aconfigure.ac | |
121 | ||
122 | %configure \ | |
7f66a9ac | 123 | CFLAGS="%{rpmcflags} %{?with_video:-DPJMEDIA_HAS_VIDEO=1}" \ |
fafdac2c JK |
124 | --enable-shared \ |
125 | %{__enable_disable sound sound} \ | |
126 | %{__enable_disable video video} \ | |
127 | %{__enable_disable resample resample} \ | |
128 | %{__enable_disable opencore_amr opencore-amr} \ | |
129 | %{__with sound external-pa} \ | |
25ed81fc | 130 | --without-libyuv \ |
87add2cd | 131 | --disable-libyuv \ |
fafdac2c JK |
132 | --with-external-speex \ |
133 | --with-external-srtp \ | |
134 | --with-external-gsm | |
49f97888 | 135 | %{__make} -j1 |
fafdac2c JK |
136 | |
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | ||
49f97888 | 140 | %{__make} -j1 install \ |
fafdac2c JK |
141 | DESTDIR=$RPM_BUILD_ROOT |
142 | ||
143 | %clean | |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %post -p /sbin/ldconfig | |
147 | %postun -p /sbin/ldconfig | |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
151 | %doc README.txt | |
152 | %attr(755,root,root) %{_libdir}/libg7221codec.so.2 | |
153 | %attr(755,root,root) %{_libdir}/libilbccodec.so.2 | |
fafdac2c JK |
154 | %attr(755,root,root) %{_libdir}/libpj.so.2 |
155 | %attr(755,root,root) %{_libdir}/libpjlib-util.so.2 | |
156 | %attr(755,root,root) %{_libdir}/libpjmedia-audiodev.so.2 | |
157 | %attr(755,root,root) %{_libdir}/libpjmedia-codec.so.2 | |
158 | %attr(755,root,root) %{_libdir}/libpjmedia-videodev.so.2 | |
159 | %attr(755,root,root) %{_libdir}/libpjmedia.so.2 | |
160 | %attr(755,root,root) %{_libdir}/libpjnath.so.2 | |
161 | %attr(755,root,root) %{_libdir}/libpjsip-simple.so.2 | |
162 | %attr(755,root,root) %{_libdir}/libpjsip-ua.so.2 | |
163 | %attr(755,root,root) %{_libdir}/libpjsip.so.2 | |
164 | %attr(755,root,root) %{_libdir}/libpjsua.so.2 | |
6033074b JK |
165 | %attr(755,root,root) %{_libdir}/libpjsua2.so.2 |
166 | %{?with_resample:%attr(755,root,root) %{_libdir}/libresample.so.2} | |
fafdac2c JK |
167 | |
168 | %files devel | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_libdir}/libg7221codec.so | |
171 | %attr(755,root,root) %{_libdir}/libilbccodec.so | |
fafdac2c JK |
172 | %attr(755,root,root) %{_libdir}/libpj.so |
173 | %attr(755,root,root) %{_libdir}/libpjlib-util.so | |
174 | %attr(755,root,root) %{_libdir}/libpjmedia-audiodev.so | |
175 | %attr(755,root,root) %{_libdir}/libpjmedia-codec.so | |
176 | %attr(755,root,root) %{_libdir}/libpjmedia-videodev.so | |
177 | %attr(755,root,root) %{_libdir}/libpjmedia.so | |
178 | %attr(755,root,root) %{_libdir}/libpjnath.so | |
179 | %attr(755,root,root) %{_libdir}/libpjsip-simple.so | |
180 | %attr(755,root,root) %{_libdir}/libpjsip-ua.so | |
181 | %attr(755,root,root) %{_libdir}/libpjsip.so | |
182 | %attr(755,root,root) %{_libdir}/libpjsua.so | |
6033074b | 183 | %attr(755,root,root) %{_libdir}/libpjsua2.so |
fafdac2c JK |
184 | %{?with_resample:%attr(755,root,root) %{_libdir}/libresample.so} |
185 | %{_includedir}/pj* | |
186 | %{_pkgconfigdir}/lib%{name}.pc | |
187 | ||
188 | %files static | |
189 | %defattr(644,root,root,755) | |
190 | %{_libdir}/libg7221codec-%{libsuffix}.a | |
191 | %{_libdir}/libilbccodec-%{libsuffix}.a | |
fafdac2c JK |
192 | %{_libdir}/libpj-%{libsuffix}.a |
193 | %{_libdir}/libpjlib-util-%{libsuffix}.a | |
194 | %{_libdir}/libpjmedia-audiodev-%{libsuffix}.a | |
195 | %{_libdir}/libpjmedia-codec-%{libsuffix}.a | |
196 | %{_libdir}/libpjmedia-%{libsuffix}.a | |
197 | %{_libdir}/libpjmedia-videodev-%{libsuffix}.a | |
198 | %{_libdir}/libpjnath-%{libsuffix}.a | |
199 | %{_libdir}/libpjsip-%{libsuffix}.a | |
200 | %{_libdir}/libpjsip-simple-%{libsuffix}.a | |
201 | %{_libdir}/libpjsip-ua-%{libsuffix}.a | |
202 | %{_libdir}/libpjsua-%{libsuffix}.a | |
6033074b | 203 | %{_libdir}/libpjsua2-%{libsuffix}.a |
fafdac2c | 204 | %{?with_resample:%{_libdir}/libresample-%{libsuffix}.a} |