]> git.pld-linux.org Git - packages/pjproject.git/blob - pjproject.spec
Version: 2.5.1
[packages/pjproject.git] / pjproject.spec
1 #
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
5 #
6 # If we have another package using this library we may need to change bcond
7 # defaults.
8 #
9 # TODO:
10 #       - fix --with opencore_amr
11 #       - libresample.so conflicts with the libresample-devel package
12 #
13
14 # Conditional build:
15 %bcond_with     sound           # enable sound support (AST wiki suggests disabling it)
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)
19
20 Summary:        PJSIP - free and open source multimedia communication library
21 Name:           pjproject
22 Version:        2.5.1
23 Release:        1
24 License:        GPL v2+
25 Group:          Libraries
26 Source0:        http://www.pjsip.org/release/%{version}/%{name}-%{version}.tar.bz2
27 # Source0-md5:  379562fe32ff279ba0ad8a6b81a3d0cb
28 Source1:        config_site.h
29 Patch0:         %{name}-ilbc-link.patch
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
44 BuildRequires:  speexdsp-devel
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
51 %ifarch x32
52 %define         libsuffix       x86_64-pld-linux-gnux32
53 %else
54 %define         libsuffix       %{_arch}-pld-linux-gnu
55 %endif
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}
77 Requires:       SILK_SDK-devel
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
98 %setup -q
99 %patch0 -p1
100
101 cp -p %{SOURCE1} pjlib/include/pj/config_site.h
102
103 %build
104 %{__autoconf} -o configure aconfigure.ac
105
106 %configure \
107         CFLAGS="%{rpmcflags} %{?with_video:-DPJMEDIA_HAS_VIDEO=1}" \
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} \
114         --without-libyuv \
115         --disable-libyuv \
116         --with-external-speex \
117         --with-external-srtp \
118         --with-external-gsm
119 %{__make} -j1
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 %{__make} -j1 install \
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
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
149 %attr(755,root,root) %{_libdir}/libpjsua2.so.2
150 %{?with_resample:%attr(755,root,root) %{_libdir}/libresample.so.2}
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
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
167 %attr(755,root,root) %{_libdir}/libpjsua2.so
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
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
187 %{_libdir}/libpjsua2-%{libsuffix}.a
188 %{?with_resample:%{_libdir}/libresample-%{libsuffix}.a}
This page took 0.122158 seconds and 3 git commands to generate.