sofia-sip.spec.in 5.38 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}-%{release}
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
%defattr(-,root,root,-)
94
%{_prefix}/include/sofia-sip*/sofia-sip/*.h
95
%{_prefix}/include/sofia-sip*/sofia-resolv/*.h
96
%{_prefix}/include/sofia-sip*/sofia-sip/*.h.in
97 98
%{_prefix}/share/sofia-sip/tag_dll.awk
%{_prefix}/share/sofia-sip/msg_parser.awk
Pekka Pessi's avatar
Pekka Pessi committed
99 100 101 102
%{_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
103
%doc TODO README.developers
104

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

Pekka Pessi's avatar
Pekka Pessi committed
112 113 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
%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
139 140 141 142 143 144 145 146 147

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

%changelog
159 160 161
* Mon Sep 18 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Removed *.m4 files from the distribution package.

162 163 164
* Fri Aug 11 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Modified the install location of the awk scripts.

165
* Thu Jun 15 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
166
- Added library soname to sofia-sip-glib package name.
167 168
- Modified dependencies - the glib subpackages do not depend
  on a specific version of sofia-sip anymore.
169

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

173 174 175 176
* 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/

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

180
* Thu Oct  6 2005 Pekka Pessi <Pekka.Pessi@iki.fi>
Pekka Pessi's avatar
Pekka Pessi committed
181 182
- Added sub-package utils

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

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