%define api 2.0 %define major 0 %define libname %mklibname gnet %{api} %{major} %define devname %mklibname gnet %{api} -d Summary: A network library Name: gnet2 Version: 2.0.8 Release: %mkrel 17 URL: https://wiki.gnome.org/GNetLibrary/ License: LGPL Source0: gnet-%{version}.tar.bz2 Patch0: gnet2-2.0.8-build.patch Group: System/Libraries BuildRequires: 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. Features: * TCP 'client' sockets * TCP 'server' sockets * Non-blocking TCP sockets * UDP * IP Multicast * Internet address abstraction %package -n %{libname} Summary: Libgnet, a network library Group: System/Libraries Obsoletes: %{_lib}gnet-2.0_0 < 2.0.8-11 %description -n %{libname} 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. %package -n %{devname} Summary: Header files for the Gnet library Group: Development/C Provides: lib%{name}-devel = %{version}-%{release} Provides: libgnet%{api}-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Obsoletes: %{_lib}gnet-2.0-devel < 2.0.8-11 %description -n %{devname} 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. %prep %setup -q -n gnet-%{version} chmod 755 doc/html %autopatch -p1 %build # fix build on aarch64 autoreconf -vfi export CFLAGS="%{optflags} -fPIC" %configure2_5x \ --disable-static %make_build %install %make_install #remove unpackaged files rm -rf %{buildroot}%{_datadir}/doc/libgnet%{api_version}-dev rm -fr %{buildroot}%{_datadir}/gtk-doc/ #we don't want these find %{buildroot} -name "*.la" -delete %files -n %{libname} %{_libdir}/libgnet-%{api}.so.%{major} %{_libdir}/libgnet-%{api}.so.%{major}.* %files -n %{devname} %doc README ChangeLog NEWS TODO AUTHORS HACKING doc/html %{_includedir}/gnet-2.0/ %{_datadir}/aclocal/* %{_libdir}/gnet-2.0/ %{_libdir}/libgnet-%{api}.so %{_libdir}/pkgconfig/gnet-%{api}.pc