sofia-sip.spec.in 6.98 KB
Newer Older
1
# Sofia SIP UA Library
Pekka Pessi's avatar
Pekka Pessi committed
2

3
Summary: Sofia SIP User-Agent library
Pekka Pessi's avatar
Pekka Pessi committed
4 5
Name: sofia-sip
Version: @VERSION@
6
Release: 1%{?dist}
7
License: LGPL
Pekka Pessi's avatar
Pekka Pessi committed
8 9 10 11 12
Group: System Environment/Libraries
URL: http://sf.net/projects/sofia-sip
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

13 14
BuildRequires: pkgconfig

15 16
%define opt_with() %{expand:%%global with_%{1} %%{?_with_%{1}:1}%%{?!_with_%{1}:0}}
%define opt_without() %{expand:%%global with_%{1} %%{!?_without_%{1}:1}%%{?_without_%{1}:0}}
17

18
# Options:
19 20 21 22 23
%opt_with doxygen	- Generate documents using doxygen and dot
%opt_with check		- Run tests
%opt_with openssl	- Always use OpenSSL (TLS)
%opt_with glib		- Always use glib-2.0 (>= 2.2)
%opt_with sctp		- Include SCTP transport
24 25

%define have_doxygen %{?_with_doxygen:1}%{!?_with_doxygen:0}
26 27
%define have_openssl %(%{?!_with_openssl:pkg-config 'openssl >= 0.9.7'&&}echo 1||echo 0)
%define have_glib %(%{?!_with_glib:pkg-config 'glib-2.0 >= 2.2'&&}echo 1||echo 0)
Pekka Pessi's avatar
Pekka Pessi committed
28

29 30
%if %{have_doxygen}
BuildRequires: doxygen >= 1.3, graphviz
31 32 33 34 35 36 37
%endif
%if %{have_openssl}
BuildRequires: openssl-devel >= 0.9.7
%endif
%if %{have_glib}
BuildRequires: glib2-devel >= 2.2
%endif
38

Pekka Pessi's avatar
Pekka Pessi committed
39 40 41 42 43
%description
Sofia SIP is a RFC-3261-compliant library for SIP user agents and other
network elements.

%prep
44
%setup -q
Pekka Pessi's avatar
Pekka Pessi committed
45 46

%build
47
options="--disable-dependency-tracking"
48
options="$options --with-pic --enable-shared --disable-static"
49 50 51
%if !%{have_glib}
options="$options --without-glib"
%endif
52
%if %{with_sctp}
53 54 55 56
options="$options --enable-sctp"
%endif

%configure $options
57

58
make %{_smp_mflags}
59
%if %{have_doxygen}
60 61
make doxygen
%endif
Pekka Pessi's avatar
Pekka Pessi committed
62

63 64
# XXX comment next line to build with non-check aware rpmbuild.
%check
65
%if %{with_check}
66 67 68
make check
%endif

Pekka Pessi's avatar
Pekka Pessi committed
69 70 71
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
72

73 74
# Remove extra files
find $RPM_BUILD_ROOT -type f -name *.la -print0 | xargs -0 rm
75

76
%if %{have_doxygen}
77
# Manually install development docs into manual
78 79
cp -p -r libsofia-sip-ua/docs/html manual
%endif
Pekka Pessi's avatar
Pekka Pessi committed
80 81 82 83

%clean
rm -rf $RPM_BUILD_ROOT

84 85 86 87
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

Pekka Pessi's avatar
Pekka Pessi committed
88 89
%files
%defattr(-,root,root,-)
90
%{_libdir}/libsofia-sip-ua.so.*
Pekka Pessi's avatar
Pekka Pessi committed
91
%doc AUTHORS COPYING COPYRIGHTS README
Pekka Pessi's avatar
Pekka Pessi committed
92

93
%if %{have_glib}
94
# note: soname in pkgname allows install of multiple library versions
95
# The glib interface is still a bit unstable
96
%package	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
97
Summary:	GLIB bindings for Sofia-SIP
98
Group:		System Environment/Libraries
99 100 101
Requires:	sofia-sip
Obsoletes:	sofia-sip-glib < %{version}-%{release}
Provides:	sofia-sip-glib = %{version}-%{release}
Pekka Pessi's avatar
Pekka Pessi committed
102

103
%description	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
104 105
GLib interface to Sofia SIP User Agent library.

106
%files 		glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
107
%defattr(-,root,root,-)
108
%{_libdir}/libsofia-sip-ua-glib.so.*
109 110 111 112
%doc AUTHORS COPYING COPYRIGHTS README libsofia-sip-ua-glib/ChangeLog

%post glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@ -p /sbin/ldconfig
%postun glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@ -p /sbin/ldconfig
Pekka Pessi's avatar
Pekka Pessi committed
113 114 115

%endif

Pekka Pessi's avatar
Pekka Pessi committed
116
%package	devel
117 118
Summary:	Sofia-SIP Development Package
Group:		Development/Libraries
Pekka Pessi's avatar
Pekka Pessi committed
119
Requires:	sofia-sip = %{version}-%{release}
120 121
Obsoletes:	sofia-devel < %{version}-%{release}
Provides:	sofia-devel = %{version}-%{release}
122

123
Requires:	pkgconfig
124

Pekka Pessi's avatar
Pekka Pessi committed
125
%description	devel
126
Development package for Sofia SIP UA library. This package includes
127
static libraries and include files.
Pekka Pessi's avatar
Pekka Pessi committed
128

129
%if !%{with_doxygen}
130
The reference documentation for Sofia SIP UA library is available at
131 132
<http://sofia-sip.sourceforge.net/development.html>
%endif
133

Pekka Pessi's avatar
Pekka Pessi committed
134
%files 		devel
135
%defattr(-,root,root,-)
136 137 138 139 140 141 142 143 144 145 146
%dir %{_includedir}/sofia-sip*
%dir %{_includedir}/sofia-sip*/sofia-sip
%{_includedir}/sofia-sip*/sofia-sip/*.h
%{_includedir}/sofia-sip*/sofia-sip/*.h.in
%dir %{_includedir}/sofia-sip*/sofia-resolv
%{_includedir}/sofia-sip*/sofia-resolv/*.h
%dir %{_datadir}/sofia-sip
%{_datadir}/sofia-sip/tag_dll.awk
%{_datadir}/sofia-sip/msg_parser.awk
%{_libdir}/libsofia-sip-ua.so
%{_libdir}/pkgconfig/sofia-sip-ua.pc
Pekka Pessi's avatar
Pekka Pessi committed
147
%doc TODO README.developers
148

149 150
%if %{have_glib}
# note: no soname here as no multiple glib-devel packages can co-exist in peace
Pekka Pessi's avatar
Pekka Pessi committed
151
%package	glib-devel
152 153 154
Summary:	GLIB bindings for Sofia SIP development files
Group:			Development/Libraries
Requires:	sofia-sip-glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@ = %{version}-%{release}
155
Requires:	sofia-sip-devel >= 1.12
156
BuildRequires:	glib2-devel >= 2.2
157

Pekka Pessi's avatar
Pekka Pessi committed
158 159
%description	glib-devel
Development package for Sofia SIP UA Glib library. This package includes
160
static libraries and include files for developing glib programs using Sofia
Pekka Pessi's avatar
Pekka Pessi committed
161 162 163 164
SIP.

%files 		glib-devel
%defattr(-,root,root,-)
165 166 167
%{_includedir}/sofia-sip*/sofia-sip/su_source.h
%{_libdir}/libsofia-sip-ua-glib.so
%{_libdir}/pkgconfig/sofia-sip-ua-glib.pc
Pekka Pessi's avatar
Pekka Pessi committed
168 169 170
%endif

%package	docs
171 172
Summary:	Sofia-SIP Development Manual Package
Group:		Documentation
Pekka Pessi's avatar
Pekka Pessi committed
173 174 175
%description	docs
HTML reference documentation for Sofia SIP UA library.

176
%if %{have_doxygen}
Pekka Pessi's avatar
Pekka Pessi committed
177 178
%files docs
%defattr(-,root,root,-)
179
%doc manual
Pekka Pessi's avatar
Pekka Pessi committed
180
%endif
Pekka Pessi's avatar
Pekka Pessi committed
181 182

%package	utils
183 184
Summary:	Sofia-SIP Command Line Utilities
Group:		Applications/Internet
Pekka Pessi's avatar
Pekka Pessi committed
185
Requires:	sofia-sip = %{version}-%{release}
186 187
Obsoletes:	sofia-utils < %{version}-%{release}
Provides:	sofia-utils = %{version}-%{release}
Pekka Pessi's avatar
Pekka Pessi committed
188 189 190
%description	utils
Command line utilities for Sofia SIP UA library.

Pekka Pessi's avatar
Pekka Pessi committed
191
%files utils
Pekka Pessi's avatar
Pekka Pessi committed
192
%defattr(-,root,root,-)
193 194 195 196 197 198
%{_bindir}/localinfo
%{_bindir}/addrinfo
%{_bindir}/sip-options
%{_bindir}/sip-date
%{_bindir}/sip-dig
%{_bindir}/stunc
Pekka Pessi's avatar
Pekka Pessi committed
199
%{_mandir}/man?/*
Pekka Pessi's avatar
Pekka Pessi committed
200 201

%changelog
202 203 204 205 206 207 208
* Thu Dec  7 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4-1
- Silenced all rpmlint warnings on FC6.

* Wed Dec  6 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4-0
- Fixing optional values on Fedora. rpmlinted. No doxygen docs.

* Tue Dec  5 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4
209 210
- Bumped version. rpmlinted.

211
* Tue Dec  5 2006 Kai Vehmanen <first.lastname at nokia.com>
212
- The 'nua-glib' module, and the related dependency to gobject, has been
213 214 215
  removed from the sofia-sip package

* Fri Oct  6 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.3
216 217 218
- Autodetecting openssl, glib and gobject support with pkg-config
  (use --with openssl --with glib and --with gobject to force them)

219
* Mon Sep 18 2006 Kai Vehmanen <first.lastname at nokia.com>
220 221
- Removed *.m4 files from the distribution package.

222
* Fri Aug 11 2006 Kai Vehmanen <first.lastname at nokia.com>
223 224
- Modified the install location of the awk scripts.

225
* Thu Jun 15 2006 Kai Vehmanen <first.lastname at nokia.com>
226
- Added library soname to sofia-sip-glib package name.
227 228
- Modified dependencies - the glib subpackages do not depend
  on a specific version of sofia-sip anymore.
229

230
* Wed Mar 08 2006 Kai Vehmanen <first.lastname at nokia.com>
231 232
- Added libsofia-sip-ua-glib to the package.

233
* Tue Nov 15 2005 Kai Vehmanen <first.lastname at nokia.com>
234 235 236
- Removed the --includedir parameter. The public headers are
  now installed under includedir/sofia-sip-MAJOR.MINOR/

237
* Thu Oct 20 2005 Pekka Pessi <first.lastname at nokia.com>
238
- Using %%{_lib} instead of lib
Pekka Pessi's avatar
Pekka Pessi committed
239

240
* Thu Oct  6 2005 Pekka Pessi <first.lastname at nokia.com>
Pekka Pessi's avatar
Pekka Pessi committed
241 242
- Added sub-package utils

243
* Thu Oct  6 2005 Pekka Pessi <first.lastname at nokia.com> - 1.11.0
Pekka Pessi's avatar
Pekka Pessi committed
244 245
- Added %%{?dist} to release

246
* Sat Jul 23 2005 Pekka Pessi <first.lastname at nokia.com> - 1.10.1
Pekka Pessi's avatar
Pekka Pessi committed
247
- Initial build.