Package libsoup: Specfile

%define ver_major 2.2
%def_disable static
%def_enable ssl

Name: libsoup
Version: %ver_major.104
Release: alt1

Summary: Simple Object Access Protocol implementation
Group: System/Libraries
License: LGPL
Url: http://www.gnome.org/projects/evolution/

Source: ftp://ftp.gnome.org/pub/gnome/sources/%name/%ver_major/%name-%version.tar.bz2
Patch0: %name-2.2.91-libs.patch
#Patch1: %name-2.2.93-pkgconfig.patch
Patch2: %name-2.2.103-client-ssl.patch 

%define gnutls_ver 1.4.0

Obsoletes: soup
Provides: soup = %version-%release

%if_enabled ssl
Requires: libgnutls >= %gnutls_ver
BuildRequires: libgnutls-devel >= %gnutls_ver
BuildRequires: libtasn1-devel libgcrypt-devel libgpg-error-devel
%endif

BuildRequires: docbook-dtds docbook-style-xsl common-licenses glib2-devel
BuildRequires: gtk-doc libxml2-devel pkg-config xml-common xsltproc zlib-devel

%description
Soup provides an queued asynchronous callback-based mechanism for sending and
servicing SOAP requests, and a WSDL (Web Service Definition Language) to C
compiler which generates client stubs and server skeletons for easily calling
and implementing SOAP methods.

%package devel
Summary: Headers for Simple Object Access Protocol library
Group: Development/C
Obsoletes: soup-devel
Provides: soup-devel = %version-%release
Requires: %name = %version-%release
%if_enabled ssl
Requires: libgnutls-devel >= %gnutls_ver
%endif

%description devel
Soup provides an queued asynchronous callback-based mechanism for sending and
servicing SOAP requests, and a WSDL (Web Service Definition Language) to C
compiler which generates client stubs and server skeletons for easily calling
and implementing SOAP methods.

This package allows to develop applications that use the Soup library.

%package devel-doc
Summary: Development documentation for Simple Object Access Protocol library
Group: Development/C
Conflicts: %name < %version-%release

%description devel-doc
Soup provides an queued asynchronous callback-based mechanism for sending and
servicing SOAP requests, and a WSDL (Web Service Definition Language) to C
compiler which generates client stubs and server skeletons for easily calling
and implementing SOAP methods.

This package contains development documentation for Soup.

%package devel-static
Summary: Headers for Simple Object Access Protocol static library
Group: Development/C
Obsoletes: soup-devel-static
Provides: soup-devel-static = %version-%release
Requires: %name-devel = %version-%release

%description devel-static
Soup provides an queued asynchronous callback-based mechanism for sending and
servicing SOAP requests, and a WSDL (Web Service Definition Language) to C
compiler which generates client stubs and server skeletons for easily calling
and implementing SOAP methods.

This package allows to develop applications that statically linked
against Soup library.

%define _gtk_docdir %_datadir/gtk-doc/html

%prep
%setup -q
%patch0 -p1
%patch2 -p0
rm -f COPYING
ln -s %_licensedir/LGPL-2 COPYING
bzip2 -9k ChangeLog

%build
autoreconf -isfv
%configure \
    --enable-gtk-doc \
    %{subst_enable static} \
    %{subst_enable ssl}

%make_build

%install
%make_install DESTDIR=%buildroot install

%post -p %post_ldconfig
%postun -p %postun_ldconfig

%files
%_libdir/*.so.*
%doc README ChangeLog.bz2 NEWS AUTHORS
%doc --no-dereference COPYING

%files devel
%_includedir/*
%_libdir/*.so
%_libdir/pkgconfig/*

%files devel-doc
%_gtk_docdir/*

%if_enabled static
%files devel-static
%_libdir/*.a
%endif

%changelog
* Fri Nov 30 2007 Ilya Mashkin <oddity@altlinux.ru> 2.2.104-alt1
- updated to 2.2.104

* Tue Nov 22 2007 Ilya Mashkin <oddity@altlinux.ru> 2.2.103-alt1
- updated to 2.2.103  (fix #13486)
- add libsoup-2.2.103-client-ssl.patch (fix #13485)

* Sat Feb 24 2007 Ilya Mashkin <oddity@altlinux.ru> 2.2.100-alt1
- updated to 2.2.100
- disabled old patches

* Mon Jan 01 2007 Ilya Mashkin <oddity@altlinux.ru> 2.2.96-alt2
- fix URL

* Fri Sep 01 2006 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.96-alt1
- Updated to 2.2.96

* Tue May 30 2006 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.93-alt1
- Release 2.2.93
- Patch1: Remove internal dependencies from pkgconfig flags,
  using the Requires tag instead (bug 9568)

* Sat Apr 15 2006 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.92-alt1
- Release 2.2.92

* Thu Mar 30 2006 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.91-alt2
- Patch0: add missing libraries to linker flags

* Thu Mar 30 2006 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.91-alt1
- 2.2.91
- Install the license symlink
- Compressed ChangeLog

* Thu Feb 02 2006 ALT QA Team Robot <qa-robot@altlinux.org> 2.2.7-alt1.1
- Rebuilt for new pkg-config dependencies.

* Tue Nov 29 2005 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.7-alt1
- 2.2.7

* Wed Aug 31 2005 Mikhail Zabaluev <mhz@altlinux.ru> 2.2.6.1-alt1
- Updated to 2.2.6.1

* Wed Jun 01 2005 ALT QA Team Robot <qa-robot@altlinux.org> 2.2.3-alt1.1
- Rebuilt with libgnutls.so.12.

* Tue Mar 15 2005 Yuri N. Sedunov <aris@altlinux.ru> 2.2.3-alt1
- 2.2.3

* Fri Feb 18 2005 Yuri N. Sedunov <aris@altlinux.ru> 2.2.2-alt1
- 2.2.2
- documentation moved to devel-doc subpackage.

* Thu Oct 28 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.2.1-alt1
- 2.2.1

* Thu Sep 09 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.2.0-alt1
- 2.2.0

* Tue Jul 20 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.12-alt1
2.1.12

* Sat Jun 05 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.11-alt1
- 2.1.11

* Fri May 21 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.10-alt1
- 2.1.10

* Thu Apr 08 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.9-alt2
- rebuild against new gnutls (1.0.10).

* Tue Apr 06 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.9-alt1
- 2.1.9

* Sat Mar 06 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.8-alt1
- 2.1.8

* Wed Feb 11 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.7-alt1
- 2.1.7

* Tue Feb 10 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.6-alt1
- 2.1.6

* Tue Jan 27 2004 Yuri N. Sedunov <aris@altlinux.ru> 2.1.5-alt1
- new version

* Thu Jun 19 2003 AEN <aen@altlinux.ru> 1.99.23-alt1
- new version
- obsolete packagw soup

* Mon Nov 18 2002 AEN <aen@altlinux.ru> 0.7.9-alt1
- 0.7.9 release

* Fri Oct 25 2002 AEN <aen@altlinux.ru> 0.7.9-alt0.1
- first Sisyphus build, spec based on Ximian's

* Fri Oct 25 2002 Ximian, Inc.

- Version: 0.7.8.99-snap.ximian.200210250601
- Summary: New build.
- New automated build.

* Tue Oct 1 2002 Ximian, Inc.

- Version: 0.7.8-ximian.1
- Summary: New build.
- New automated build.

* Sun Mar 3 2002 Ximian, Inc.

- Version: 0.6.0-ximian.1
- Summary: New build.
- New automated build.