]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: | |
3 | # - /opt ?????? | |
4 | # - cvpnd use nobody account, permission to /proc/net and /etc/opt/cisco-vpnclient/* files and dirs | |
5 | # | |
6 | # Status: | |
7 | # - disconnects after few seconds with kernel-vanilla 2.6.31 | |
8 | # - works well with kernel-vanilla 2.6.31.4 | |
9 | # | |
10 | # NOTE: | |
11 | # - version for older kernels (<= 2.6.28) is saved od LINUX_MAX_2_6_28 branch | |
12 | # | |
13 | # Conditional build: | |
14 | %bcond_without dist_kernel # without distribution kernel | |
15 | %bcond_without kernel # don't build kernel modules | |
16 | %bcond_without userspace # don't build userspace tools | |
17 | %bcond_with verbose # verbose build (V=1) | |
18 | # | |
19 | %if !%{with kernel} | |
20 | %undefine with_dist_kernel | |
21 | %endif | |
22 | %define _rel 4 | |
23 | Summary: Cisco Systems VPN Client | |
24 | Summary(pl.UTF-8): Klient VPN produkcji Cisco Systems | |
25 | Name: cisco-vpnclient | |
26 | Version: 4.8.02.0030_k9 | |
27 | Release: %{_rel} | |
28 | License: Commercial | |
29 | Group: Networking | |
30 | # Source0-download: http://projects.tuxx-home.at/ciscovpn/clients/linux/ | |
31 | Source0: vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz | |
32 | # NoSource0-md5: de869c26dbc3b8851759907855dee48c | |
33 | Source1: %{name}.modprobe | |
34 | NoSource: 0 | |
35 | # patches - http://projects.tuxx-home.at/?id=cisco_vpn_client | |
36 | Patch1: %{name}-skbuff_offset.patch | |
37 | Patch2: %{name}-interceptor.patch | |
38 | URL: http://www.cisco.com/en/US/products/sw/secursw/ps2308/tsd_products_support_series_home.html | |
39 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.31} | |
40 | BuildRequires: rpmbuild(macros) >= 1.379 | |
41 | %if %{with userspace} | |
42 | ExclusiveArch: %{ix86} | |
43 | %else | |
44 | ExclusiveArch: %{ix86} %{x8664} | |
45 | %endif | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | Cisco Systems VPN Client. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Klient VPN produkcji Cisco Systems. | |
53 | ||
54 | %package -n kernel%{_alt_kernel}-net-cisco_ipsec | |
55 | Summary: Cisco Systems VPN Client - kernel module | |
56 | Summary(pl.UTF-8): Klient VPN produkcji Cisco Systems - moduł jądra | |
57 | Release: %{_rel}@%{_kernel_ver_str} | |
58 | Group: Base/Kernel | |
59 | %{?with_dist_kernel:%requires_releq_kernel} | |
60 | Requires(post,postun): /sbin/depmod | |
61 | Provides: cisco-vpnclient(kernel) | |
62 | ||
63 | %description -n kernel%{_alt_kernel}-net-cisco_ipsec | |
64 | Cisco Systems VPN Client - Linux kernel module. | |
65 | ||
66 | %description -n kernel%{_alt_kernel}-net-cisco_ipsec -l pl.UTF-8 | |
67 | Klient VPN produkcji Cisco Systems - moduł jądra Linuksa. | |
68 | ||
69 | %prep | |
70 | %setup -q -c | |
71 | %patch1 -p0 | |
72 | %patch2 -p0 | |
73 | ||
74 | %build | |
75 | %if %{with kernel} | |
76 | %ifarch %{x8664} | |
77 | export KBUILD_NOPEDANTIC=1 | |
78 | %endif | |
79 | %build_kernel_modules -m cisco_ipsec -C vpnclient | |
80 | %endif | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | cd vpnclient | |
85 | %if %{with kernel} | |
86 | %install_kernel_modules -m cisco_ipsec -d misc | |
87 | %endif | |
88 | ||
89 | %if %{with userspace} | |
90 | install -d $RPM_BUILD_ROOT{/etc/modprobe.d,%{_sbindir}} \ | |
91 | $RPM_BUILD_ROOT%{_sysconfdir}/opt/cisco-vpnclient/{Certificates,Profiles} \ | |
92 | $RPM_BUILD_ROOT/opt/cisco-vpnclient/{bin,lib,include} | |
93 | ||
94 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/cisco-vpnclient.conf | |
95 | ||
96 | install {cisco_cert_mgr,vpnclient,cvpnd,ipseclog} $RPM_BUILD_ROOT/opt/cisco-vpnclient/bin | |
97 | install libvpnapi.so $RPM_BUILD_ROOT/opt/cisco-vpnclient/lib | |
98 | install vpnapi.h $RPM_BUILD_ROOT/opt/cisco-vpnclient/include | |
99 | install vpnclient.ini $RPM_BUILD_ROOT%{_sysconfdir}/opt/cisco-vpnclient | |
100 | ||
101 | ln -sf /opt/cisco-vpnclient/bin/cisco_cert_mgr $RPM_BUILD_ROOT%{_sbindir} | |
102 | ln -sf /opt/cisco-vpnclient/bin/vpnclient $RPM_BUILD_ROOT%{_sbindir} | |
103 | ln -sf /opt/cisco-vpnclient/bin/ipseclog $RPM_BUILD_ROOT%{_sbindir} | |
104 | ln -sf %{_sysconfdir}/opt/cisco-vpnclient $RPM_BUILD_ROOT%{_sysconfdir}/CiscoSystemsVPNClient | |
105 | %endif | |
106 | ||
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post -n kernel%{_alt_kernel}-net-cisco_ipsec | |
111 | %depmod %{_kernel_ver} | |
112 | ||
113 | %postun -n kernel%{_alt_kernel}-net-cisco_ipsec | |
114 | %depmod %{_kernel_ver} | |
115 | ||
116 | %if %{with userspace} | |
117 | %files | |
118 | %defattr(644,root,root,755) | |
119 | %doc vpnclient/license.txt vpnclient/sample.pcf | |
120 | /etc/modprobe.d/cisco-vpnclient.conf | |
121 | %dir /opt/cisco-vpnclient | |
122 | %dir /opt/cisco-vpnclient/bin | |
123 | %dir /opt/cisco-vpnclient/lib | |
124 | %dir /opt/cisco-vpnclient/include | |
125 | %dir %{_sysconfdir}/opt/cisco-vpnclient | |
126 | %dir %{_sysconfdir}/opt/cisco-vpnclient/Certificates | |
127 | %dir %{_sysconfdir}/opt/cisco-vpnclient/Profiles | |
128 | %attr(755,root,root) /opt/cisco-vpnclient/bin/cisco_cert_mgr | |
129 | %attr(755,root,root) /opt/cisco-vpnclient/bin/ipseclog | |
130 | %attr(755,root,root) /opt/cisco-vpnclient/bin/vpnclient | |
131 | %attr(4111,root,root) /opt/cisco-vpnclient/bin/cvpnd | |
132 | %attr(755,root,root) %{_sbindir}/* | |
133 | /opt/cisco-vpnclient/lib/* | |
134 | /opt/cisco-vpnclient/include/* | |
135 | %attr(755,root,root) %{_sysconfdir}/CiscoSystemsVPNClient | |
136 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opt/cisco-vpnclient/vpnclient.ini | |
137 | %endif | |
138 | ||
139 | %if %{with kernel} || %{with dist_kernel} | |
140 | %files -n kernel%{_alt_kernel}-net-cisco_ipsec | |
141 | %defattr(644,root,root,755) | |
142 | /lib/modules/%{_kernel_ver}/misc/*ko* | |
143 | %endif |