Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > d8f0d72dc77c54a1295cbbd2122804e1 > files > 2

vtun-2.6-7mdk.src.rpm

%define	name	vtun
%define	version	2.6
%define	release	7mdk

Name:		%name
Version:	%version
Release:	%release
License:	GPL
Group:		Networking/Other
Url:		http://vtun.sourceforge.net/
Source:		%{name}-%{version}.tar.bz2
Source1:	vtund.init.tar.bz2
Summary:	Virtual tunnel over TCP/IP networks.
BuildRoot:	%_tmppath/%{name}-buildroot
Obsoletes:	vppp
Provides:	vppp
Buildrequires:	zlib1-devel bison libopenssl0.9.7-devel flex
Prereq:		rpm-helper

#JMD: For static binary
BuildRequires:	libopenssl0.9.7-static-devel, glibc-static-devel

%description
VTun provides the method for creating Virtual Tunnels over TCP/IP networks
and allows to shape, compress, encrypt traffic in that tunnels. 
Supported type of tunnels are: PPP, IP, Ethernet and most of other serial 
protocols and programs.

VTun is easily and highly configurable, it can be used for various network
tasks like VPN, Mobil IP, Shaped Internet access, IP address saving, etc.
It is completely user space implementation and does not require modification
to any kernel parts. 

%prep
%setup -q -n %{name}

%build
%configure --localstatedir=%{_localstatedir}/%{name} --enable-ssl --disable-lzo

#JMD: for static binary
#perl -pi -e "s/-lz/-Wl,-static -lz/g;" Makefile


#JMD: use this so we get Unix98 pty support

cat << EOF >> config.h
#define HAVE_GETPT
#define HAVE_GRANTPT
#define HAVE_UNLOCKPT
#define HAVE_PTSNAME
EOF

%make CFG_FILE=%{_sysconfdir}/vtund.conf PID_FILE=/var/run/vtund.pid  \
      STAT_DIR=/var/log/vtund LOCK_DIR=/var/lock/vtund
%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT/var/{log,lock}/vtund
tar -jxvf %{SOURCE1} -C $RPM_BUILD_ROOT
install vtund -D ${RPM_BUILD_ROOT}/%{_sbindir}/vtund
install scripts/reroute ${RPM_BUILD_ROOT}/%{_sbindir}

install vtund.8 -D ${RPM_BUILD_ROOT}/%{_mandir}/man8/vtund.8
install  vtund.conf.5 -D ${RPM_BUILD_ROOT}/%{_mandir}/man5/vtund.5

%clean
#rm -rf $RPM_BUILD_ROOT

%post
%_post_service vtund
%_post_service vtunc

%preun
%_preun_service vtund
%_preun_service vtunc

%files
%defattr(644,root,root,755)
%doc ChangeLog Credits FAQ README README.Setup README.Shaper TODO
%doc vtund.conf
%config(noreplace) %_sysconfdir/xinetd.d/vtun
%config(noreplace) %_sysconfdir/sysconfig/vtun?
%dir /var/log/vtund
%dir /var/lock/vtund
%_mandir/man8/*
%_mandir/man5/*
%defattr(755,root,root,755)
%_sbindir/vtund
%_sbindir/reroute
%config(noreplace) %_initrddir/vtun?

%changelog
* Mon Oct 18 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.6-7mdk
- add UnixPTY defines in config.h so it uses /dev/pty/s0 instead of
 /dev/ttyp0.

* Mon Oct 18 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.6-6mdk
- another set of init fixes. Services should now refuse to start if
  mandatory options in /etc/sysconfig are not set, of if the config file
  is not present.

* Fri Oct 15 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.6-5mdk
- more init fixes

* Fri Oct 15 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.6-4mdk
- fix initscripts not to start client and server if not configured
- remove default configuration from /etc otherwise the server starts
  automatically with default passwords!

* Wed Jan 21 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.6-3mdk
- check and load tun module in initscript (<xavier@benigni.org>) 

* Wed Sep 10 2003 Michael Scherer <scherer.michael@free.fr> 2.6-2mdk 
- s/byacc/bison/ in BuildRequires 
- add flex as BuildRequires

* Fri Apr 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 2.6-1mdk
- 2.6
- dropped patch, merged upstream

* Tue Mar 18 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 2.5-5mdk
- quiet setup
- don't rm -rf buildroot in prep stage
- cleanups
- fix buildrequires
- remove redundant zlib from requires, rpm will automatically depend on this
- nicer formatting

* Mon Aug 26 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.5-4mdk
- fix initscripts
- add prereq rpm-helper (rpmlint wants)

* Sat Aug 24 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.5-3mdk
- add %%_sbindir/reroute
- update initscript for server
- add initscript for client
- add xinetd config

* Fri May 10 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.5-2mdk
- remove requires libopen-ssl

* Thu May 09 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.5-1mdk
- 2.5 && ressucite
- add real restart function in initscript
- disable socks and lzo

* Thu Mar 01 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.4-2mdk
- fix buildrequires

* Thu Feb 15 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.4-1mdk
_ updated to stable version

* Thu Dec 28 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.4b2-1mdk
- new in contribs
- requires liblzo