sofia-sip.spec.in 5.97 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1
#
Martti Mela's avatar
Martti Mela committed
2
# Template for Sofia SIP UA RPM spec file
Pekka Pessi's avatar
Pekka Pessi committed
3 4 5 6
#
# Options:
# --with doxygen   - Generate documents using doxygen and dot
# --with check     - Run tests
7 8 9
# --with openssl   - Always use OpenSSL (TLS)
# --with glib      - Always use glib-2.0 (>= 2.2)
# --with gobject   - Always use gobject (>= 2.4)
10
# --with sctp      - with SCTP
Pekka Pessi's avatar
Pekka Pessi committed
11 12 13 14 15
#

Summary: Sofia SIP User-Agent library 
Name: sofia-sip
Version: @VERSION@
16
Release: 1%{?dist}
Pekka Pessi's avatar
Pekka Pessi committed
17 18 19 20 21 22 23
License: Lesser GNU Public License 2.1
Group: System Environment/Libraries
URL: http://sf.net/projects/sofia-sip
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Packager: Pekka.Pessi@Nokia.com

Pekka Pessi's avatar
Pekka Pessi committed
24
%define have_doxygen %{?_with_doxygen:1}%{?!_with_doxygen:0}
25 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)
%define have_gobject %(%{?!_with_gobject:pkg-config 'gobject >= 2.4'&&}echo 1||echo 0)
Pekka Pessi's avatar
Pekka Pessi committed
28

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

Pekka Pessi's avatar
Pekka Pessi committed
42 43 44 45 46 47 48 49
%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
50 51
options="--with-aclocal=aclocal --disable-dependency-tracking"
options="$options --with-pic --enable-shared"
52 53 54
%if !%{have_glib}
options="$options --without-glib"
%endif
55 56 57
%{?_with_sctp:options="$options --enable-sctp"}
%configure $options

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

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
67 68 69
%if %{have_doxygen}
cp -p -r libsofia-sip-ua/docs/html manual
%endif
Pekka Pessi's avatar
Pekka Pessi committed
70 71 72 73 74 75

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
76
%{_prefix}/%{_lib}/libsofia-sip-ua.so.*
Pekka Pessi's avatar
Pekka Pessi committed
77
%doc AUTHORS COPYING COPYRIGHTS README
Pekka Pessi's avatar
Pekka Pessi committed
78

79
# note: soname in pkgname allows install of multiple library versions
80 81
%package	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Summary:        GLIB bindings for Sofia-SIP 
Pekka Pessi's avatar
Pekka Pessi committed
82
Group: System Environment/Libraries
83
Requires:       sofia-sip
84
Provides:       sofia-sip-glib = %{version}-%{release}
85
Obsoletes:	sofia-sip-glib
Pekka Pessi's avatar
Pekka Pessi committed
86

87
%description	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
88 89 90 91
GLib interface to Sofia SIP User Agent library.

%if %{have_glib}

92
%files 		glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
93
%defattr(-,root,root,-)
94
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.so.*
Pekka Pessi's avatar
Pekka Pessi committed
95 96 97

%endif

Pekka Pessi's avatar
Pekka Pessi committed
98
%package	devel
Pekka Pessi's avatar
Pekka Pessi committed
99
Summary:        Sofia-SIP Development Package
Pekka Pessi's avatar
Pekka Pessi committed
100 101 102 103 104
Group:     	Development/Libraries
Requires:	sofia-sip = %{version}-%{release}
Obsoletes:	sofia-devel
%description	devel
Development package for Sofia SIP UA library. This package includes 
105
static libraries and include files.
Pekka Pessi's avatar
Pekka Pessi committed
106

Pekka Pessi's avatar
Pekka Pessi committed
107
%files 		devel
108
%defattr(-,root,root,-)
109
%{_prefix}/include/sofia-sip*/sofia-sip/*.h
110
%{_prefix}/include/sofia-sip*/sofia-resolv/*.h
111
%{_prefix}/include/sofia-sip*/sofia-sip/*.h.in
112 113
%{_prefix}/share/sofia-sip/tag_dll.awk
%{_prefix}/share/sofia-sip/msg_parser.awk
Pekka Pessi's avatar
Pekka Pessi committed
114 115 116 117
%{_prefix}/%{_lib}/libsofia-sip-ua.la
%{_prefix}/%{_lib}/libsofia-sip-ua.a
%{_prefix}/%{_lib}/libsofia-sip-ua.so
%{_prefix}/%{_lib}/pkgconfig/sofia-sip-ua.pc
Pekka Pessi's avatar
Pekka Pessi committed
118
%doc TODO README.developers
119

120
# note: no soname here as files installed to the same place
Pekka Pessi's avatar
Pekka Pessi committed
121
%package	glib-devel
122
Summary:        GLIB bindings for Sofia SIP development files
Pekka Pessi's avatar
Pekka Pessi committed
123
Group: 		Development/Libraries
124
Requires:       sofia-sip-glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@ = %{version}-%{release}
125
Requires:	sofia-sip-devel >= 1.12
126

Pekka Pessi's avatar
Pekka Pessi committed
127 128 129 130
%description	glib-devel
Development package for Sofia SIP UA Glib library. This package includes
pstatic libraries and include files for developing glib programs using Sofia
SIP.
131 132 133
%if !%{have_gobject}
Note that this version does not support gobject interface.
%endif
Pekka Pessi's avatar
Pekka Pessi committed
134 135 136 137

%if %{have_glib}
%files 		glib-devel
%defattr(-,root,root,-)
138
%if %{have_gobject}
Pekka Pessi's avatar
Pekka Pessi committed
139
%{_prefix}/include/sofia-sip*/sofia-sip/nua_glib.h
140
%endif
Pekka Pessi's avatar
Pekka Pessi committed
141 142 143 144 145 146 147 148
%{_prefix}/include/sofia-sip*/sofia-sip/su_source.h
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.la
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.a
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.so
%{_prefix}/%{_lib}/pkgconfig/sofia-sip-ua-glib.pc
%endif

%package	docs
149
Summary:        Sofia-SIP Development Manual Package
Pekka Pessi's avatar
Pekka Pessi committed
150 151 152 153 154 155 156
Group:     	Development/Libraries
%description	docs
HTML reference documentation for Sofia SIP UA library.

%if %{have_doxygen}
%files docs
%defattr(-,root,root,-)
157
%doc manual
Pekka Pessi's avatar
Pekka Pessi committed
158
%endif
Pekka Pessi's avatar
Pekka Pessi committed
159 160

%package	utils
161
Summary:        Sofia-SIP Command Line Utilities
Pekka Pessi's avatar
Pekka Pessi committed
162 163 164 165 166 167
Group:     	Development/Libraries
Requires:	sofia-sip = %{version}-%{release}
Obsoletes:	sofia-utils
%description	utils
Command line utilities for Sofia SIP UA library.

Pekka Pessi's avatar
Pekka Pessi committed
168
%files utils
Pekka Pessi's avatar
Pekka Pessi committed
169 170
%defattr(-,root,root,-)
%{_prefix}/bin/localinfo
171
%{_prefix}/bin/addrinfo
Pekka Pessi's avatar
Pekka Pessi committed
172 173
%{_prefix}/bin/sip-options
%{_prefix}/bin/sip-date
Pekka Pessi's avatar
Pekka Pessi committed
174
%{_prefix}/bin/sip-dig
175
%{_prefix}/bin/stunc
Pekka Pessi's avatar
Pekka Pessi committed
176
%{_mandir}/man?/*
Pekka Pessi's avatar
Pekka Pessi committed
177 178

%changelog
179 180 181 182
* 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)

183 184 185
* Mon Sep 18 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Removed *.m4 files from the distribution package.

186 187 188
* Fri Aug 11 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Modified the install location of the awk scripts.

189
* Thu Jun 15 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
190
- Added library soname to sofia-sip-glib package name.
191 192
- Modified dependencies - the glib subpackages do not depend
  on a specific version of sofia-sip anymore.
193

194 195 196
* Wed Mar 08 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Added libsofia-sip-ua-glib to the package.

197 198 199 200
* Tue Nov 15 2005 Kai Vehmanen <kai.vehmanen@nokia.com>
- Removed the --includedir parameter. The public headers are
  now installed under includedir/sofia-sip-MAJOR.MINOR/

201
* Thu Oct 20 2005 Pekka Pessi <Pekka.Pessi@nokia.com>
Pekka Pessi's avatar
Pekka Pessi committed
202 203
- Using %{_lib} instead of lib

204
* Thu Oct  6 2005 Pekka Pessi <Pekka.Pessi@iki.fi>
Pekka Pessi's avatar
Pekka Pessi committed
205 206
- Added sub-package utils

Pekka Pessi's avatar
Pekka Pessi committed
207 208 209
* Thu Oct  6 2005 Pekka Pessi <Pekka.Pessi@nokia.com> - 1.11.0
- Added %%{?dist} to release

Pekka Pessi's avatar
Pekka Pessi committed
210 211
* Sat Jul 23 2005 Pekka Pessi <Pekka.Pessi@nokia.com> - 1.10.1
- Initial build.