sofia-sip.spec.in 4.68 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

Pekka Pessi's avatar
Pekka Pessi committed
64 65 66 67 68 69 70 71 72 73 74 75
%package	glib
Summary:        GLIB Libraries for Sofia-SIP 
Group: System Environment/Libraries
Requires:	sofia-sip = %{version}-%{release}

%description	glib
GLib interface to Sofia SIP User Agent library.

%if %{have_glib}

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

%endif

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

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

Pekka Pessi's avatar
Pekka Pessi committed
104 105 106 107 108
%package	glib-devel
Summary:        GLIB Development Libraries for Sofia SIP 
Group: 		Development/Libraries
Requires:	sofia-sip = %{version}-%{release}
Requires:	sofia-sip-devel = %{version}-%{release}
109

Pekka Pessi's avatar
Pekka Pessi committed
110 111 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
%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
137 138 139 140 141 142 143 144 145

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

%changelog
156 157 158
* Wed Mar 08 2006 Kai Vehmanen <kai.vehmanen@nokia.com>
- Added libsofia-sip-ua-glib to the package.

159 160 161 162
* 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/

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

166
* Thu Oct  6 2005 Pekka Pessi <Pekka.Pessi@iki.fi>
Pekka Pessi's avatar
Pekka Pessi committed
167 168
- Added sub-package utils

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

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