]> git.pld-linux.org Git - packages/openvpn.git/blob - openvpn.spec
1aecdbe917ff8b1d6e4d31ba16a10be429b47cd5
[packages/openvpn.git] / openvpn.spec
1
2 # Conditional build:
3 %bcond_without  pkcs11          # build without PKCS#11 support
4
5 Summary:        VPN Daemon
6 Summary(pl.UTF-8):      Serwer VPN
7 Name:           openvpn
8 Version:        2.3.0
9 Release:        1
10 License:        GPL
11 Group:          Networking/Daemons
12 Source0:        http://swupdate.openvpn.net/community/releases/%{name}-%{version}.tar.gz
13 # Source0-md5:  56cffde5d5320e0b1ec364d3e486aca9
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Source3:        %{name}.tmpfiles
17 Patch0:         %{name}-pam.patch
18 URL:            http://www.openvpn.net/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  libselinux-devel
22 BuildRequires:  lzo-devel
23 BuildRequires:  openssl-devel >= 0.9.7d
24 BuildRequires:  pam-devel
25 %{?with_pkcs11:BuildRequires:   pkcs11-helper-devel}
26 BuildRequires:  rpmbuild(macros) >= 1.268
27 Requires(post,preun):   /sbin/chkconfig
28 Requires:       /sbin/ip
29 Requires:       rc-scripts >= 0.4.3.0
30 Conflicts:      kernel < 2.4
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _localstatedir  /var
34
35 %description
36 OpenVPN is a robust and highly configurable VPN (Virtual Private
37 Network) daemon which can be used to securely link two or more private
38 networks using an encrypted tunnel over the internet.
39
40 %description -l pl.UTF-8
41 OpenVPN jest mocnym i silnie konfigurowalnym serwerem VPN (Wirtualne
42 Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
43 lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
44 internet.
45
46 %package devel
47 Summary:        Header files for OpenVPN plugins development
48 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia wtyczek OpenVPN
49 Group:          Development/Libraries
50
51 %description devel
52 This is the package containing the header files for OpenVPN plugins
53 development.
54
55 %description devel -l pl.UTF-8
56 Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61
62 sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
63
64 %build
65 %{__aclocal} -I m4
66 %{__autoheader}
67 %{__autoconf}
68 %{__automake}
69
70 %configure \
71         %{!?with_pkcs11:--disable-pkcs11} \
72         --enable-password-save \
73         --enable-iproute2 \
74         --enable-selinux \
75         --enable-systemd \
76         IFCONFIG=/sbin/ifconfig \
77         IPROUTE=/sbin/ip \
78         ROUTE=/sbin/route \
79         NETSTAT=/bin/netstat
80
81 %{__make}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
86         $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/run/openvpn,%{_includedir}} \
87         $RPM_BUILD_ROOT{%{_libdir}/%{name}/plugins,/usr/lib/tmpfiles.d}
88
89 %{__make} install \
90         DESTDIR=$RPM_BUILD_ROOT
91
92 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
93 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
94 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 /sbin/chkconfig --add openvpn
101 %service openvpn restart "OpenVPN"
102
103 %preun
104 if [ "$1" = "0" ]; then
105         %service openvpn stop
106         /sbin/chkconfig --del openvpn
107 fi
108
109 %files
110 %defattr(644,root,root,755)
111 %doc AUTHORS README* ChangeLog sample/sample-{config-files,keys,scripts} doc/management-notes.txt
112 %doc *.IPv6 src/plugins/*/README.*
113 %dir %{_sysconfdir}/openvpn
114 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
115 %attr(755,root,root) %{_sbindir}/openvpn
116 %attr(754,root,root) /etc/rc.d/init.d/%{name}
117 %dir %{_libdir}/%{name}
118 %dir %{_libdir}/%{name}/plugins
119 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
120 %{_mandir}/man?/*
121 %dir /var/run/openvpn
122 /usr/lib/tmpfiles.d/%{name}.conf
123
124 %files devel
125 %defattr(644,root,root,755)
126 %doc doc/README.plugins sample/sample-plugins
127 %{_includedir}/*.h
This page took 0.098958 seconds and 2 git commands to generate.