]> git.pld-linux.org Git - packages/openvpn.git/blob - openvpn.spec
- added missing Requires()
[packages/openvpn.git] / openvpn.spec
1 Summary:        VPN Daemon
2 Summary(pl):    Serwer VPN
3 Name:           openvpn
4 Version:        1.3.1
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        http://prdownloads.sourceforge.net/openvpn/%{name}-%{version}.tar.gz
9 Source1:        %{name}.init
10 Source2:        %{name}.sysconfig
11 URL:            http://openvpn.sourceforge.net/
12 BuildRequires:  automake
13 BuildRequires:  autoconf
14 BuildRequires:  lzo-devel
15 BuildRequires:  openssl-devel >= 0.9.6
16 PreReq:         rc-scripts
17 Requires(post,preun):   /sbin/chkconfig
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _localstatedir  /var
21
22 %description
23 OpenVPN is a robust and highly configurable VPN (Virtual Private
24 Network) daemon which can be used to securely link two or more private
25 networks using an encrypted tunnel over the internet.
26
27 %description -l pl
28 OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
29 Sieci Prywatne), który mo¿e byæ u¿yty do bezpiecznego ³±czenia dwóch
30 lub wiêcej prywatnych sieci u¿ywaj±c zaszyfrowanego tunelu poprzez
31 internet.
32
33 %prep
34 %setup -q
35
36 %build
37 %{__aclocal}
38 autoheader
39 %{__autoconf}
40 %{__automake}
41 %configure 
42 %{__make} #CFLAGS="%{rpmcflags}"
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8}
47 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/var/run/openvpn}
48
49 install %{name} $RPM_BUILD_ROOT%{_sbindir}
50 install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
51
52 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
53 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 /sbin/chkconfig --add openvpn
60 if [ -f /var/lock/subsys/openvpn ]; then
61         /etc/rc.d/init.d/openvpn restart 1>&2
62 else
63         echo "Type \"/etc/rc.d/init.d/openvpn start\" to start OpenVPN" 1>&2
64 fi
65
66 %preun
67 if [ "$1" = "0" ]; then
68         if [ -f /var/lock/subsys/openvpn ]; then
69                 /etc/rc.d/init.d/openvpn stop 1>&2
70         fi
71         /sbin/chkconfig --del openvpn
72 fi    
73
74 %files
75 %defattr(644,root,root,755)
76 %doc AUTHORS README ChangeLog sample-config-files sample-keys 
77 %attr(755,root,root) %{_sbindir}/*
78 %dir %{_sysconfdir}/%{name}
79 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
80 %attr(754,root,root) %config(noreplace) /etc/rc.d/init.d/%{name}
81 %{_mandir}/man?/*
82 %dir /var/run/openvpn
This page took 0.027948 seconds and 3 git commands to generate.