]>
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 | |
030809fb JK |
22 | Version: 2.5.1 |
23 | Release: 1 | |
fafdac2c JK |
24 | License: GPL v2+ |
25 | Group: Libraries | |
6033074b | 26 | Source0: http://www.pjsip.org/release/%{version}/%{name}-%{version}.tar.bz2 |
030809fb | 27 | # Source0-md5: 379562fe32ff279ba0ad8a6b81a3d0cb |
7f66a9ac | 28 | Source1: config_site.h |
6033074b | 29 | Patch0: %{name}-ilbc-link.patch |
fafdac2c JK |
30 | URL: http://www.pjsip.org/ |
31 | %{?with_video:BuildRequires: SDL2-devel} | |
32 | BuildRequires: SILK_SDK-devel | |
33 | BuildRequires: autoconf | |
34 | %{?with_video:BuildRequires: ffmpeg-devel} | |
35 | BuildRequires: libgsm-devel | |
36 | %{?with_video:BuildRequires: libv4l-devel} | |
37 | %{?with_opencore_amr:BuildRequires: opencore-amr-devel} | |
38 | BuildRequires: openssl-devel | |
39 | BuildRequires: pkgconfig | |
40 | %{?with_sound:BuildRequires: portaudio-devel} | |
41 | BuildRequires: python-modules | |
42 | BuildRequires: rpmbuild(macros) >= 1.583 | |
43 | BuildRequires: speex-devel | |
f98e9468 | 44 | BuildRequires: speexdsp-devel |
fafdac2c JK |
45 | BuildRequires: srtp-devel |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | # dependency loop between libpjmedia-videodev.so and libpjmedia.so | |
49 | %define skip_post_check_so libpjmedia-videodev.so.* | |
50 | ||
c2a2909a JR |
51 | %ifarch x32 |
52 | %define libsuffix x86_64-pld-linux-gnux32 | |
53 | %else | |
fafdac2c | 54 | %define libsuffix %{_arch}-pld-linux-gnu |
c2a2909a | 55 | %endif |
fafdac2c JK |
56 | |
57 | %description | |
58 | PJSIP is a free and open source multimedia communication library | |
59 | written in C language implementing standard based protocols such as | |
60 | SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol | |
61 | (SIP) with rich multimedia framework and NAT traversal functionality | |
62 | into high level API that is portable and suitable for almost any type | |
63 | of systems ranging from desktops, embedded systems, to mobile | |
64 | handsets. | |
65 | ||
66 | PJSIP is both compact and feature rich. It supports audio, video, | |
67 | presence, and instant messaging, and has extensive documentation. | |
68 | PJSIP is very portable. On mobile devices, it abstracts system | |
69 | dependent features and in many cases is able to utilize the native | |
70 | multimedia capabilities of the device. | |
71 | ||
72 | %package devel | |
73 | Summary: Header files for %{name} library | |
74 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
75 | Group: Development/Libraries | |
76 | Requires: %{name} = %{version}-%{release} | |
2248208b | 77 | Requires: SILK_SDK-devel |
fafdac2c JK |
78 | |
79 | %description devel | |
80 | Header files for %{name} library. | |
81 | ||
82 | %description devel -l pl.UTF-8 | |
83 | Pliki nagłówkowe biblioteki %{name}. | |
84 | ||
85 | %package static | |
86 | Summary: Static %{name} library | |
87 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
88 | Group: Development/Libraries | |
89 | Requires: %{name}-devel = %{version}-%{release} | |
90 | ||
91 | %description static | |
92 | Static %{name} library. | |
93 | ||
94 | %description static -l pl.UTF-8 | |
95 | Statyczna biblioteka %{name}. | |
96 | ||
97 | %prep | |
6033074b | 98 | %setup -q |
fafdac2c | 99 | %patch0 -p1 |
fafdac2c | 100 | |
7f66a9ac JK |
101 | cp -p %{SOURCE1} pjlib/include/pj/config_site.h |
102 | ||
fafdac2c JK |
103 | %build |
104 | %{__autoconf} -o configure aconfigure.ac | |
105 | ||
106 | %configure \ | |
7f66a9ac | 107 | CFLAGS="%{rpmcflags} %{?with_video:-DPJMEDIA_HAS_VIDEO=1}" \ |
fafdac2c JK |
108 | --enable-shared \ |
109 | %{__enable_disable sound sound} \ | |
110 | %{__enable_disable video video} \ | |
111 | %{__enable_disable resample resample} \ | |
112 | %{__enable_disable opencore_amr opencore-amr} \ | |
113 | %{__with sound external-pa} \ | |
25ed81fc | 114 | --without-libyuv \ |
87add2cd | 115 | --disable-libyuv \ |
fafdac2c JK |
116 | --with-external-speex \ |
117 | --with-external-srtp \ | |
118 | --with-external-gsm | |
49f97888 | 119 | %{__make} -j1 |
fafdac2c JK |
120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
49f97888 | 124 | %{__make} -j1 install \ |
fafdac2c JK |
125 | DESTDIR=$RPM_BUILD_ROOT |
126 | ||
127 | %clean | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %post -p /sbin/ldconfig | |
131 | %postun -p /sbin/ldconfig | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
135 | %doc README.txt | |
136 | %attr(755,root,root) %{_libdir}/libg7221codec.so.2 | |
137 | %attr(755,root,root) %{_libdir}/libilbccodec.so.2 | |
fafdac2c JK |
138 | %attr(755,root,root) %{_libdir}/libpj.so.2 |
139 | %attr(755,root,root) %{_libdir}/libpjlib-util.so.2 | |
140 | %attr(755,root,root) %{_libdir}/libpjmedia-audiodev.so.2 | |
141 | %attr(755,root,root) %{_libdir}/libpjmedia-codec.so.2 | |
142 | %attr(755,root,root) %{_libdir}/libpjmedia-videodev.so.2 | |
143 | %attr(755,root,root) %{_libdir}/libpjmedia.so.2 | |
144 | %attr(755,root,root) %{_libdir}/libpjnath.so.2 | |
145 | %attr(755,root,root) %{_libdir}/libpjsip-simple.so.2 | |
146 | %attr(755,root,root) %{_libdir}/libpjsip-ua.so.2 | |
147 | %attr(755,root,root) %{_libdir}/libpjsip.so.2 | |
148 | %attr(755,root,root) %{_libdir}/libpjsua.so.2 | |
6033074b JK |
149 | %attr(755,root,root) %{_libdir}/libpjsua2.so.2 |
150 | %{?with_resample:%attr(755,root,root) %{_libdir}/libresample.so.2} | |
fafdac2c JK |
151 | |
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{_libdir}/libg7221codec.so | |
155 | %attr(755,root,root) %{_libdir}/libilbccodec.so | |
fafdac2c JK |
156 | %attr(755,root,root) %{_libdir}/libpj.so |
157 | %attr(755,root,root) %{_libdir}/libpjlib-util.so | |
158 | %attr(755,root,root) %{_libdir}/libpjmedia-audiodev.so | |
159 | %attr(755,root,root) %{_libdir}/libpjmedia-codec.so | |
160 | %attr(755,root,root) %{_libdir}/libpjmedia-videodev.so | |
161 | %attr(755,root,root) %{_libdir}/libpjmedia.so | |
162 | %attr(755,root,root) %{_libdir}/libpjnath.so | |
163 | %attr(755,root,root) %{_libdir}/libpjsip-simple.so | |
164 | %attr(755,root,root) %{_libdir}/libpjsip-ua.so | |
165 | %attr(755,root,root) %{_libdir}/libpjsip.so | |
166 | %attr(755,root,root) %{_libdir}/libpjsua.so | |
6033074b | 167 | %attr(755,root,root) %{_libdir}/libpjsua2.so |
fafdac2c JK |
168 | %{?with_resample:%attr(755,root,root) %{_libdir}/libresample.so} |
169 | %{_includedir}/pj* | |
170 | %{_pkgconfigdir}/lib%{name}.pc | |
171 | ||
172 | %files static | |
173 | %defattr(644,root,root,755) | |
174 | %{_libdir}/libg7221codec-%{libsuffix}.a | |
175 | %{_libdir}/libilbccodec-%{libsuffix}.a | |
fafdac2c JK |
176 | %{_libdir}/libpj-%{libsuffix}.a |
177 | %{_libdir}/libpjlib-util-%{libsuffix}.a | |
178 | %{_libdir}/libpjmedia-audiodev-%{libsuffix}.a | |
179 | %{_libdir}/libpjmedia-codec-%{libsuffix}.a | |
180 | %{_libdir}/libpjmedia-%{libsuffix}.a | |
181 | %{_libdir}/libpjmedia-videodev-%{libsuffix}.a | |
182 | %{_libdir}/libpjnath-%{libsuffix}.a | |
183 | %{_libdir}/libpjsip-%{libsuffix}.a | |
184 | %{_libdir}/libpjsip-simple-%{libsuffix}.a | |
185 | %{_libdir}/libpjsip-ua-%{libsuffix}.a | |
186 | %{_libdir}/libpjsua-%{libsuffix}.a | |
6033074b | 187 | %{_libdir}/libpjsua2-%{libsuffix}.a |
fafdac2c | 188 | %{?with_resample:%{_libdir}/libresample-%{libsuffix}.a} |