%define prefix /usr #Uncomment these if they are not defined by your rpm macros file #%define _prefix /usr #%define _exec_prefix %{_prefix} #%define _bindir %{_exec_prefix}/bin #%define _sbindir %{_exec_prefix}/sbin #%define _libexecdir %{_exec_prefix}/libexec #%define _datadir %{_prefix}/share #%define _sysconfdir %{_prefix}/etc #%define _sharedstatedir %{_prefix}/com #%define _localstatedir %{_prefix}/var #%define _lib lib #%define _libdir %{_exec_prefix}/%{_lib} #%define _includedir %{_prefix}/include #%define _oldincludedir /usr/include #%define _infodir %{_prefix}/info #%define _mandir %{_prefix}/man Summary: Simplify TCP/IP socket operations Name: vanessa_socket Version: @VERSION@ Release: 1 Copyright: GNU Lesser General Public Licence (examples released under the GNU General Public Licence) URL: http://www.vergenet.net/linux/vanessa/ Packager: Horms Group: Development/Libraries Source0: ftp://vergenet.net/pub/vanessa_socket/vanessa_socket/%{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-%{version}-root Docdir: %{prefix}/doc Provides: %{name}-%{version} BuildPrereq: automake autoconf libtool vanessa_logger-devel >= 0.0.5 Requires: vanessa_logger >= 0.0.5 %description Library to simplify TCP/IP socket operations. Includes code to open a socket to a server as a client, to listen on socket for clients as a server and to pipe information between sockets. %package devel Summary: Headers and static libraries for development Group: Development/Libraries Requires: %{name}-%{version} vanessa_logger-devel >= 0.0.5 Provides: %{name}-devel-%{version} %description devel Headers and static libraries required to develop against libvanessa_socket. %package pipe Summary: Trivial TCP/IP pipe build using libvanessa_adt Group: Applications/System Copyright: GNU General Public Licence Requires: %{name}-%{version} Provides: %{name}-pipe-%{version} BuildRequires: popt %description pipe A TCP/IP pipe is a user space programme that listens for TCP/IP connections on port on the local host and when a client connects makes a connection to a TCP/IP port, possibly on another host. Once both connections are established data sent on one connection is relayed to the other, hence forming a bi-directional pipe. Uses include enabling connections to specific ports on hosts behind a packet filter. This code is intended primarily as an example of how many of the features of libvanessa_socket work. %prep %setup %build # I am providing my own configure macro replacement. Hopefully this # will result in fewer portability problems than using the one supplied # by various vendours. I fear that I hope in vein. CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS if [ -f confgure.in ]; then aclocal libtoolize --force --copy autoheader automake autoconf fi ./configure %{_target_platform} \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --includedir=%{_includedir} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} make %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}/{etc,%{prefix}/{lib,bin,doc}} make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post %postun %preun %files %defattr(-, root, root) %{_libdir}/*.so* %files devel %defattr(-, root, root) %{_libdir}/*.*a %{_includedir}/*.h %doc README COPYING ChangeLog %files pipe %defattr(-, root, root) %{_bindir}/vanessa_socket_pipe %{_mandir}/man1/vanessa_socket_pipe.* %doc vanessa_socket_pipe/COPYING %changelog * Fri Dec 14 2001 Horms Revamped configure to use %{_libdir} and friends. This should be more distribution indepentant. With thanks to Scot W. Hetzel * Fri Dec 14 2001 Horms Use %configure and %{_libdir} and friends. This should be more distribution indepentant. With thanks to Scot W. Hetzel * Mon Feb 12 2001 Horms Added manual page for vanessa_socket_pipe * Sat Sep 2 2000 Horms created for version 0.0.0