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