]> git.pld-linux.org Git - packages/openvpn.git/blame - openvpn.spec
- updated to 2.1.4
[packages/openvpn.git] / openvpn.spec
CommitLineData
1e54a8c4 1Summary: VPN Daemon
f284e4d9 2Summary(pl.UTF-8): Serwer VPN
1e54a8c4 3Name: openvpn
6a22ca81
SP
4Version: 2.1.4
5Release: 1
1e54a8c4
AM
6License: GPL
7Group: Networking/Daemons
6a22ca81
SP
8Source0: http://swupdate.openvpn.net/community/releases/%{name}-%{version}.tar.gz
9# Source0-md5: 96a11868082685802489254f03ff3bde
1e54a8c4
AM
10Source1: %{name}.init
11Source2: %{name}.sysconfig
6b9f12e5 12Source3: %{name}-update-resolv-conf
531730d9
ER
13# https://sourceforge.net/tracker/?func=detail&aid=2998676&group_id=48978&atid=454719
14Source4: http://svn.openvpn.net/projects/openvpn/trunk/openvpn/management/management-notes.txt
15# Source4-md5: 49dfbc513caf09d310f81bf330598c4b
6f1eceea
AM
16Patch0: %{name}-optflags.patch
17Patch1: easy-rsa2.patch
07cae1c8 18Patch2: %{name}-pam.patch
72e50cf3 19URL: http://www.openvpn.net/
a32abac3
JB
20BuildRequires: autoconf
21BuildRequires: automake
1e54a8c4 22BuildRequires: lzo-devel
2d7ad149 23BuildRequires: openssl-devel >= 0.9.7d
7367fd64 24BuildRequires: pam-devel
d3fff5ef 25BuildRequires: pkcs11-helper-devel
60554416 26BuildRequires: rpmbuild(macros) >= 1.268
a32abac3 27Requires(post,preun): /sbin/chkconfig
dc577c8b 28Requires: /sbin/ip
1a7a867b
ER
29Requires: rc-scripts >= 0.4.0.19
30Conflicts: kernel < 2.4
1e54a8c4
AM
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%define _localstatedir /var
34
35%description
36OpenVPN is a robust and highly configurable VPN (Virtual Private
37Network) daemon which can be used to securely link two or more private
38networks using an encrypted tunnel over the internet.
39
22031f4a 40%description -l pl.UTF-8
1e54a8c4 41OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
22031f4a
JR
42Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
43lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
1e54a8c4
AM
44internet.
45
088b9e85 46%package devel
a1c1b5a0 47Summary: Header files for OpenVPN plugins development
f284e4d9 48Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek OpenVPN
088b9e85
ER
49Group: Development/Libraries
50
51%description devel
a1c1b5a0
JB
52This is the package containing the header files for OpenVPN plugins
53development.
54
22031f4a
JR
55%description devel -l pl.UTF-8
56Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
088b9e85 57
1a7a867b
ER
58%package -n easy-rsa
59Summary: Small RSA key management package
f284e4d9 60Summary(pl.UTF-8): Mały pakiet do zarządzania kluczami RSA
3faee1a3 61Group: Applications
c838cb1a 62Requires: grep
1a7a867b 63Requires: openssl-tools
1a7a867b
ER
64
65%description -n easy-rsa
66This is a small RSA key management package, based on the openssl
67command line tool, that can be found in the easy-rsa subdirectory of
68the OpenVPN distribution.
69
70For step-by-step instructions, see the HOWTO:
72e50cf3 71<http://www.openvpn.net/index.php/documentation/howto.html>.
1a7a867b 72
22031f4a
JR
73%description -n easy-rsa -l pl.UTF-8
74To jest mały pakiet do zarządzania kluczami RSA, oparty na narzędziu
75linii poleceń openssl. Pakiet ten pochodzi z podkatalogu easy-rsa
c838cb1a
JB
76dystrybucji OpenVPN.
77
22031f4a 78Instrukcje krok po kroku można znaleźć w HOWTO:
72e50cf3 79<http://www.openvpn.net/index.php/documentation/howto.html>.
c838cb1a 80
1e54a8c4 81%prep
da7b9d5f 82%setup -q
7c5604b6 83%patch0 -p1
088b9e85 84%patch1 -p1
07cae1c8 85%patch2 -p1
1e54a8c4 86
727c4226
ER
87mv plugin/auth-pam/README README.auth-pam
88mv plugin/down-root/README README.down-root
89
6b9f12e5
ER
90sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
91
531730d9
ER
92cp %{SOURCE4} .
93
1e54a8c4 94%build
8abf6e16 95%{__aclocal}
96%{__autoheader}
97%{__autoconf}
98%{__automake}
73042e26 99
8abf6e16 100%configure \
6f1eceea 101 --enable-password-save \
8c54323d 102 --enable-pthread \
103 --enable-iproute2
90f19f01 104%{__make} CFLAGS="%{rpmcflags} -D_GNU_SOURCE"
1e54a8c4 105
c838cb1a
JB
106%{__make} -C plugin/auth-pam \
107 OPTFLAGS="%{rpmcflags}"
108%{__make} -C plugin/down-root \
109 OPTFLAGS="%{rpmcflags}"
088b9e85 110
1e54a8c4
AM
111%install
112rm -rf $RPM_BUILD_ROOT
c13903eb 113install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
088b9e85 114 $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir},%{_libdir}/%{name}/plugins}
1e54a8c4 115
f063e411 116install openvpn $RPM_BUILD_ROOT%{_sbindir}
1e54a8c4
AM
117install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
118
55a7ee18
JK
119install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
120install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
088b9e85
ER
121install openvpn-plugin.h $RPM_BUILD_ROOT%{_includedir}
122install plugin/{auth-pam,down-root}/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
1e54a8c4 123
1a7a867b
ER
124# easy-rsa 2.0
125install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}}/easy-rsa
126install -d $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa/keys
127cp -a easy-rsa/2.0/{vars,openssl.cnf} $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa
128cp -a easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,revoke-full,sign-req} $RPM_BUILD_ROOT%{_datadir}/easy-rsa
129cp -a easy-rsa/2.0/pkitool $RPM_BUILD_ROOT%{_sbindir}
130
727c4226
ER
131# we use cp -a, not to pull /bin/bash dependency
132cp -a contrib/pull-resolv-conf/client.down $RPM_BUILD_ROOT%{_libdir}/%{name}
133cp -a contrib/pull-resolv-conf/client.up $RPM_BUILD_ROOT%{_libdir}/%{name}
6b9f12e5 134cp -a contrib/update-resolv-conf $RPM_BUILD_ROOT%{_libdir}/%{name}
6f1eceea 135
1e54a8c4
AM
136%clean
137rm -rf $RPM_BUILD_ROOT
138
55a7ee18
JK
139%post
140/sbin/chkconfig --add openvpn
1a7a867b 141%service openvpn restart "OpenVPN"
55a7ee18
JK
142
143%preun
144if [ "$1" = "0" ]; then
1a7a867b 145 %service openvpn stop
55a7ee18 146 /sbin/chkconfig --del openvpn
a34b9b51 147fi
55a7ee18 148
1e54a8c4
AM
149%files
150%defattr(644,root,root,755)
531730d9 151%doc AUTHORS README* ChangeLog sample-config-files sample-keys sample-scripts management-notes.txt
f063e411 152%dir %{_sysconfdir}/openvpn
088b9e85 153%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
1a7a867b 154%attr(755,root,root) %{_sbindir}/openvpn
e06b2f01 155%attr(754,root,root) /etc/rc.d/init.d/%{name}
088b9e85 156%dir %{_libdir}/%{name}
727c4226
ER
157%attr(755,root,root) %{_libdir}/%{name}/client.down
158%attr(755,root,root) %{_libdir}/%{name}/client.up
6b9f12e5 159%attr(755,root,root) %{_libdir}/%{name}/update-resolv-conf
088b9e85
ER
160%dir %{_libdir}/%{name}/plugins
161%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
1e54a8c4 162%{_mandir}/man?/*
55a7ee18 163%dir /var/run/openvpn
088b9e85
ER
164
165%files devel
166%defattr(644,root,root,755)
167%doc plugin/{README,examples/}
168%{_includedir}/*.h
1a7a867b
ER
169
170%files -n easy-rsa
171%defattr(644,root,root,755)
172%doc easy-rsa/2.0/README
173%dir %{_sysconfdir}/easy-rsa
174%dir %attr(700,root,root) %{_sysconfdir}/easy-rsa/keys
a122d45e
ER
175%config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/vars
176%config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/openssl.cnf
1a7a867b
ER
177%attr(755,root,root) %{_sbindir}/pkitool
178%dir %{_datadir}/easy-rsa
179%attr(755,root,root) %{_datadir}/easy-rsa/*
This page took 0.13615 seconds and 4 git commands to generate.