sofia-sip.spec.in 6.51 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1
#
2
# Template for Sofia SIP UA RPM spec file. @AUTO@
Pekka Pessi's avatar
Pekka Pessi committed
3
#
4 5 6 7

%{!?bcond_with:%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}}
%{!?bcond_without:%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}}

Pekka Pessi's avatar
Pekka Pessi committed
8 9 10
# Options:
# --with doxygen   - Generate documents using doxygen and dot
# --with check     - Run tests
11 12
# --with openssl   - Always use OpenSSL (TLS)
# --with glib      - Always use glib-2.0 (>= 2.2)
13
# --with gobject   - Always use gobject (>= 2.4)
14
# --with sctp      - with SCTP
Pekka Pessi's avatar
Pekka Pessi committed
15 16 17 18 19
#

Summary: Sofia SIP User-Agent library 
Name: sofia-sip
Version: @VERSION@
20
Release: 1%{?dist}
21
License: LGPL
Pekka Pessi's avatar
Pekka Pessi committed
22 23 24 25 26
Group: System Environment/Libraries
URL: http://sf.net/projects/sofia-sip
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

27 28
BuildRequires: pkgconfig

29 30
%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)
31
%define have_gobject %(%{?!_with_gobject:pkg-config 'gobject >= 2.4'&&}echo 1||echo 0)
Pekka Pessi's avatar
Pekka Pessi committed
32

33
%if %{with doxygen}
34 35 36 37 38 39 40 41
BuildRequires: doxygen >= 1.3
%endif
%if %{have_openssl}
BuildRequires: openssl-devel >= 0.9.7
%endif
%if %{have_glib}
BuildRequires: glib2-devel >= 2.2
%endif
42

Pekka Pessi's avatar
Pekka Pessi committed
43 44 45 46 47 48 49 50
%description
Sofia SIP is a RFC-3261-compliant library for SIP user agents and other
network elements.

%prep
%setup -q -n sofia-sip-%{version}

%build
51
options="--with-aclocal=aclocal --disable-dependency-tracking"
52
options="$options --with-pic --enable-shared --disable-static"
53 54 55
%if !%{have_glib}
options="$options --without-glib"
%endif
56
%{?_with_sctp:options="$options --enable-sctp"}
57
%configure $options CFLAGS="-Os -DNDEBUG -g"
58

59
make %{_smp_mflags}
Pekka Pessi's avatar
Pekka Pessi committed
60
%{?_with_check:make check}
61
%if %{with doxygen}
62 63
make doxygen
%endif
Pekka Pessi's avatar
Pekka Pessi committed
64 65 66 67

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
68 69 70 71 72

find $RPM_BUILD_ROOT -type f -name *.la -exec rm -f {} \;

%if %{with doxygen}
# Manually install development docs into manual
73 74
cp -p -r libsofia-sip-ua/docs/html manual
%endif
Pekka Pessi's avatar
Pekka Pessi committed
75 76 77 78

%clean
rm -rf $RPM_BUILD_ROOT

79 80 81 82
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

Pekka Pessi's avatar
Pekka Pessi committed
83 84
%files
%defattr(-,root,root,-)
85
%{_prefix}/%{_lib}/libsofia-sip-ua.so.*
Pekka Pessi's avatar
Pekka Pessi committed
86
%doc AUTHORS COPYING COPYRIGHTS README
Pekka Pessi's avatar
Pekka Pessi committed
87

88
# note: soname in pkgname allows install of multiple library versions
89
# The glib interface is still a bit unstable...
90 91
%package	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Summary:        GLIB bindings for Sofia-SIP 
92
Group:		System Environment/Libraries
93
Requires:       sofia-sip
94
Provides:       sofia-sip-glib = %{version}-%{release}
95
Obsoletes:	sofia-sip-glib
Pekka Pessi's avatar
Pekka Pessi committed
96

97
%description	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
98 99 100 101
GLib interface to Sofia SIP User Agent library.

%if %{have_glib}

102
%files 		glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
103
%defattr(-,root,root,-)
104
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.so.*
105 106 107 108
%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
109 110 111

%endif

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

Requires: 	pkgconfig

Pekka Pessi's avatar
Pekka Pessi committed
121 122
%description	devel
Development package for Sofia SIP UA library. This package includes 
123
static libraries and include files.
Pekka Pessi's avatar
Pekka Pessi committed
124

125

Pekka Pessi's avatar
Pekka Pessi committed
126
%files 		devel
127
%defattr(-,root,root,-)
128
%{_prefix}/include/sofia-sip*/sofia-sip/*.h
129
%{_prefix}/include/sofia-sip*/sofia-resolv/*.h
130
%{_prefix}/include/sofia-sip*/sofia-sip/*.h.in
131 132
%{_prefix}/share/sofia-sip/tag_dll.awk
%{_prefix}/share/sofia-sip/msg_parser.awk
133 134
# %{_prefix}/%{_lib}/libsofia-sip-ua.la
# %{_prefix}/%{_lib}/libsofia-sip-ua.a
Pekka Pessi's avatar
Pekka Pessi committed
135 136
%{_prefix}/%{_lib}/libsofia-sip-ua.so
%{_prefix}/%{_lib}/pkgconfig/sofia-sip-ua.pc
Pekka Pessi's avatar
Pekka Pessi committed
137
%doc TODO README.developers
138

139
# note: no soname here as files installed to the same place
Pekka Pessi's avatar
Pekka Pessi committed
140
%package	glib-devel
141
Summary:        GLIB bindings for Sofia SIP development files
Pekka Pessi's avatar
Pekka Pessi committed
142
Group: 		Development/Libraries
143
Requires:       sofia-sip-glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@ = %{version}-%{release}
144
Requires:	sofia-sip-devel >= 1.12
145 146 147 148 149 150
%if %{have_gobject}
BuildRequires:	glib2-devel >= 2.4
%endif
%if %{have_glib}
BuildRequires:	glib2-devel >= 2.2
%endif
151

Pekka Pessi's avatar
Pekka Pessi committed
152 153
%description	glib-devel
Development package for Sofia SIP UA Glib library. This package includes
154
static libraries and include files for developing glib programs using Sofia
Pekka Pessi's avatar
Pekka Pessi committed
155 156 157 158 159 160
SIP.

%if %{have_glib}
%files 		glib-devel
%defattr(-,root,root,-)
%{_prefix}/include/sofia-sip*/sofia-sip/su_source.h
161 162
# %{_prefix}/%{_lib}/libsofia-sip-ua-glib.la
# %{_prefix}/%{_lib}/libsofia-sip-ua-glib.a
Pekka Pessi's avatar
Pekka Pessi committed
163 164 165 166 167
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.so
%{_prefix}/%{_lib}/pkgconfig/sofia-sip-ua-glib.pc
%endif

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

173
%if %{with doxygen}
Pekka Pessi's avatar
Pekka Pessi committed
174 175
%files docs
%defattr(-,root,root,-)
176
%doc manual
Pekka Pessi's avatar
Pekka Pessi committed
177
%endif
Pekka Pessi's avatar
Pekka Pessi committed
178 179

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

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

%changelog
199 200 201 202
* Fri Oct  6 2006 Pekka Pessi
- Autodetecting openssl, glib and gobject support with pkg-config
  (use --with openssl --with glib and --with gobject to force them)

203
* Mon Sep 18 2006 Kai Vehmanen <first.lastname at nokia.com>
204 205
- Removed *.m4 files from the distribution package.

206
* Fri Aug 11 2006 Kai Vehmanen <first.lastname at nokia.com>
207 208
- Modified the install location of the awk scripts.

209
* Thu Jun 15 2006 Kai Vehmanen <first.lastname at nokia.com>
210
- Added library soname to sofia-sip-glib package name.
211 212
- Modified dependencies - the glib subpackages do not depend
  on a specific version of sofia-sip anymore.
213

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

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

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

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

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

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