sofia-sip.spec.in 5.19 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 7
#
# Options:
# --with doxygen   - Generate documents using doxygen and dot
# --with check     - Run tests
# --without openssl - No OpenSSL (TLS)
8 9
# --without glib   - no GLIB
# --with sctp      - with SCTP
Pekka Pessi's avatar
Pekka Pessi committed
10 11 12 13 14
#

Summary: Sofia SIP User-Agent library 
Name: sofia-sip
Version: @VERSION@
15
Release: 1%{?dist}
Pekka Pessi's avatar
Pekka Pessi committed
16 17 18 19 20 21 22 23 24 25 26
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

%{?_with_doxygen:BuildRequires: doxygen >= 1.3.4}
%{?_with_doxygen:BuildRequires: graphviz >= 1.9}
%{?!_without_openssl:BuildRequires: openssl-devel >= 0.9.7}

Pekka Pessi's avatar
Pekka Pessi committed
27 28 29 30 31
%define have_doxygen %{?_with_doxygen:1}%{?!_with_doxygen:0}

%{?!_without_glib:BuildRequires: glib2-devel >= 2.2}

%define have_glib %{?!_without_glib:1}%{?_without_glib:0}
32

Pekka Pessi's avatar
Pekka Pessi committed
33 34 35 36 37 38 39 40
%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
41 42 43 44 45 46
options="--with-aclocal=aclocal --disable-dependency-tracking"
options="$options --with-pic --enable-shared"
%{?_without_glib:options="$options --without-glib"}
%{?_with_sctp:options="$options --enable-sctp"}
%configure $options

47
make %{_smp_mflags}
Pekka Pessi's avatar
Pekka Pessi committed
48
%{?_with_check:make check}
49
%{?_with_doxygen:make doxygen}
Pekka Pessi's avatar
Pekka Pessi committed
50 51 52 53

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
54
%{?_with_doxygen:cp -p -r libsofia-sip-ua/docs/html manual}
Pekka Pessi's avatar
Pekka Pessi committed
55 56 57 58 59 60

%clean
rm -rf $RPM_BUILD_ROOT

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

64
# note: soname in pkgname allows install of multiple library versions
65 66
%package	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Summary:        GLIB bindings for Sofia-SIP 
Pekka Pessi's avatar
Pekka Pessi committed
67
Group: System Environment/Libraries
68
Requires:       sofia-sip
69
Provides:       sofia-sip-glib = @VERSION@
70
Obsoletes:	sofia-sip-glib
Pekka Pessi's avatar
Pekka Pessi committed
71

72
%description	glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
73 74 75 76
GLib interface to Sofia SIP User Agent library.

%if %{have_glib}

77
%files 		glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
Pekka Pessi's avatar
Pekka Pessi committed
78
%defattr(-,root,root,-)
79
%{_prefix}/%{_lib}/libsofia-sip-ua-glib.so.*
Pekka Pessi's avatar
Pekka Pessi committed
80 81 82

%endif

Pekka Pessi's avatar
Pekka Pessi committed
83
%package	devel
Pekka Pessi's avatar
Pekka Pessi committed
84
Summary:        Sofia-SIP Development Package
Pekka Pessi's avatar
Pekka Pessi committed
85 86 87 88 89
Group:     	Development/Libraries
Requires:	sofia-sip = %{version}-%{release}
Obsoletes:	sofia-devel
%description	devel
Development package for Sofia SIP UA library. This package includes 
90
static libraries and include files.
Pekka Pessi's avatar
Pekka Pessi committed
91

Pekka Pessi's avatar
Pekka Pessi committed
92
%files 		devel
93 94 95
%defattr(-,root,root,-)
/usr/share/aclocal/sac-general.m4
/usr/share/aclocal/sac-su.m4
96
%{_prefix}/include/sofia-sip*/sofia-sip/*.h
97
%{_prefix}/include/sofia-sip*/sofia-resolv/*.h
98
%{_prefix}/include/sofia-sip*/sofia-sip/*.h.in
Pekka Pessi's avatar
Pekka Pessi committed
99 100
%{_prefix}/libexec/sofia/tag_dll.awk
%{_prefix}/libexec/sofia/msg_parser.awk
Pekka Pessi's avatar
Pekka Pessi committed
101 102 103 104
%{_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
105
%doc TODO README.developers
106

107
# note: no soname as files installed to the same place
Pekka Pessi's avatar
Pekka Pessi committed
108
%package	glib-devel
109
Summary:        GLIB bindings for Sofia SIP development files
Pekka Pessi's avatar
Pekka Pessi committed
110
Group: 		Development/Libraries
111
Requires:       sofia-sip-glib@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
112
Requires:	sofia-sip-devel >= 1.12
113

Pekka Pessi's avatar
Pekka Pessi committed
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
%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.

%if %{have_glib}
%files 		glib-devel
%defattr(-,root,root,-)
%{_prefix}/include/sofia-sip*/sofia-sip/nua_glib.h
%{_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
Summary:       Sofia-SIP Development Manual Package
Group:     	Development/Libraries
%description	docs
HTML reference documentation for Sofia SIP UA library.

%if %{have_doxygen}
%files docs
%defattr(-,root,root,-)
%{?_with_doxygen:%doc manual}
%endif
Pekka Pessi's avatar
Pekka Pessi committed
141 142 143 144 145 146 147 148 149

%package	utils
Summary:        Sofia-SIP Development Package
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
150
%files utils
Pekka Pessi's avatar
Pekka Pessi committed
151 152
%defattr(-,root,root,-)
%{_prefix}/bin/localinfo
153
%{_prefix}/bin/addrinfo
Pekka Pessi's avatar
Pekka Pessi committed
154 155
%{_prefix}/bin/sip-options
%{_prefix}/bin/sip-date
Pekka Pessi's avatar
Pekka Pessi committed
156
%{_prefix}/bin/sip-dig
157
%{_prefix}/bin/stunc
Pekka Pessi's avatar
Pekka Pessi committed
158
%{_mandir}/man?/*
Pekka Pessi's avatar
Pekka Pessi committed
159 160

%changelog
161
* Thu Jun 15 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
162
- Added library soname to sofia-sip-glib package name.
163 164
- Modified dependencies - the glib subpackages do not depend
  on a specific version of sofia-sip anymore.
165

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

169 170 171 172
* 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/

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

176
* Thu Oct  6 2005 Pekka Pessi <Pekka.Pessi@iki.fi>
Pekka Pessi's avatar
Pekka Pessi committed
177 178
- Added sub-package utils

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

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