Package libgnet: Specfile

%def_disable static

Name: libgnet
Version: 2.0.7
Release: alt1

Summary: Libgnet, a network library
License: LGPL
Group: System/Libraries
URL: http://www.gnetlibrary.org/

Source: http://www.gnetlibrary.org/src/gnet-%version.tar.gz

BuildRequires: gcc-c++ glib2-devel

%description
Gnet is a simple network library.  It is writen in C, object-oriented,
and built upon glib.  It is intended to be small, fast, easy-to-use,
and easy to port.  The interface is similar to the interface for
Java's network library. Major features are:
+ tcp 'client' sockets;
+ tcp 'server' sockets;
+ non-blocking tcp sockets;
+ udp;
+ ip multicast;
+ internet address abstraction.

%package devel
Summary: Header files for the Gnet library
Group: Development/C
Requires: %name = %version-%release, glib-devel

%description devel
Gnet is a simple network library. It is writen in C, object-oriented,
and built upon glib.
This package allows you to develop applications that use the Gnet library.


%if_enabled static
%package devel-static
Summary: Static Gnet library
Group: Development/C
Requires: %name-devel = %version-%release, glib-devel-static

%description devel-static
Gnet is a simple network library. It is writen in C, object-oriented,
and built upon glib.
This package allows you to develop statically linked applications that
use the Gnet library.

%endif


%prep
%setup -q -n gnet-%version

%build
%configure   \
	     %{subst_enable static} \
	      --with-html-dir=%_docdir
%make_build

%install
%make_install DESTDIR=%buildroot install

%make -C examples clean
%__rm -f examples/Makefile*
%__rm -Rf examples/.deps/
%__rm -Rf %buildroot%_docdir

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%_libdir/*.so.*

%files devel
%_libdir/*.so
%_libdir/gnet-2.0/
%_libdir/pkgconfig/*.pc
%_includedir/*
%_datadir/aclocal/*
%doc AUTHORS ChangeLog HACKING NEWS README TODO doc/html examples

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

%changelog
* Mon Nov 20 2006 Alexey Shabalin <shaba@altlinux.ru> 2.0.7-alt1
- 2.0.7
- disable default build static libs 

* Thu Mar 18 2004 Anton Farygin <rider@altlinux.ru> 2.0.5-alt1
- 2.0.5

* Wed Oct 23 2002 AEN <aen@altlinux.ru> 1.1.7-alt2
- pkgconfig file added to devel

* Sat Oct 05 2002 Rider <rider@altlinux.ru> 1.1.7-alt1
- 1.1.7

* Sun Aug 25 2002 Rider <rider@altlinux.ru> 1.1.5-alt1
- 1.1.5

* Tue May 29 2001 Dmitry V. Levin <ldv@altlinux.ru> 1.1.0-alt1
- 1.1.0
- Moved static library to devel-static subpackage.

* Sat Jan 13 2001 Dmitry V. Levin <ldv@fandra.org> 1.0.4-ipl2mdk
- RE adaptions.

* Thu Nov 16 2000 Vincent Saugey <vince@mandrakesoft.com> 1.0.4-2mdk
- add provides to dev package

* Mon Oct 30 2000 Vincent Saugey <vince@mandrakesoft.com> 1.0.4-1mdk
- Up to 1.0.4
- Put auconf macro and gnetconfig binarie in devel package
- make compliant with new mandrake lib policy
- add dependencie on dev package
- Patch configure for gnet.h found gnetconfig.h in /usr/lib

* Mon Oct  2 2000 Vincent Saugey <vince@mandrakesoft.com> 1.0.3-4mdk
- Change devel doc to devel package

* Fri Sep  1 2000 Vincent Saugey <vince@mandrakesoft.com> 1.0.3-3mdk
- change name
- Rebuild for next release

* Tue Aug 31 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.3-2mdk
- macros
- BM

* Tue Jul  4 2000 Vincent Saugey <vince@mandrakesoft.com> 1.0.3-1mdk
- First mdk release
- Mandrake adaptation
- Clean spec file

* Mon Feb 28 2000 David Helder <dhelder@umich.edu>
- Updated for version 1.0

* Sat Jan 15 2000 Xavier Nicolovici <nicolovi@club-internet.fr>
- Moved lib*.so and lib*a to the devel package
- Creation of a gnet.spec.in for autoconf process

* Wed Jan 14 2000 Xavier Nicolovici <nicolovi@club-internet.fr>
- HTML documentation has been move to /usr/doc/gnet-{version}/html

* Thu Jan 13 2000 Xavier Nicolovici <nicolovi@club-internet.fr>
- First try at an RPM