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