3 # _without_dist_kernel - without kernel from distribution
5 Summary: CIPE - encrypted IP over UDP tunneling
6 Summary(pl): CIPE - szyfrowany tunel IP po UDP
12 Group: Networking/Daemons
13 Source0: http://sites.inka.de/bigred/sw/%{name}-%{version}.tar.gz
14 # Source0-md5: 9d88f2d090fcafcd0e2fa73b018b6e16
15 Source1: %{name}.inetd
16 Patch0: %{name}-autoconf.patch
17 Patch1: %{name}-makefile.patch
18 Patch2: %{name}-pk%{name}-real-peer.patch
19 Patch3: %{name}-get_fast_time.patch
20 Patch4: %{name}-alpha.patch
21 URL: http://sites.inka.de/bigred/devel/cipe.html
22 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: openssl-devel >= 0.9.7
26 BuildRequires: /usr/bin/openssl
27 BuildRequires: rpmbuild(macros) >= 1.118
28 BuildRequires: %{kgcc_package}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
35 package for an encrypting IP tunnel device. This can be used to build
36 encrypting routers for VPN (Virtual Private Networks) and similar
40 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
41 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
42 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
43 podobnych zastosowaniach.
45 %package pkcipe-client
46 Summary: The PKCIPE public key tool for CIPE
47 Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
48 Group: Networking/Daemons
49 Prereq: /usr/bin/openssl
50 Requires: %{name} = %{version}
51 Obsoletes: %{name}-pkcipe
53 %description pkcipe-client
54 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
55 package for an encrypting IP tunnel device. This can be used to build
56 encrypting routers for VPN (Virtual Private Networks) and similar
57 applications. This package contains PKCIPE, which simplifies setup of
58 CIPE tunnels by using autoconfiguration and public/private key
61 %description pkcipe-client -l pl
62 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
63 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
64 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
65 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE, który uprasza
66 ustawienie tuneli CIPE przez korzystanie z autokonfiguracji oraz
67 mechanizmów kluczy publicznych/prywatnych.
69 %package pkcipe-server
70 Summary: The PKCIPE public key tool for CIPE - server side
71 Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
72 Group: Networking/Daemons
73 Requires: %{name}-pkcipe-client = %{version}
76 %description pkcipe-server
77 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
78 package for an encrypting IP tunnel device. This can be used to build
79 encrypting routers for VPN (Virtual Private Networks) and similar
80 applications. This package contains server part PKCIPE, which
81 simplifies setup of CIPE tunnels by using autoconfiguration and
82 public/private key mechanisms.
84 %description pkcipe-server -l pl
85 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
86 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
87 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
88 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE do u¿ycia po
89 stronie serwera, który uprasza ustawienie tuneli CIPE przez
90 korzystanie z autokonfiguracji oraz mechanizmów kluczy
91 publicznych/prywatnych.
93 %package -n kernel-cipe
94 Summary: CIPE kernel module
95 Summary(pl): Modu³ j±dra CIPE
96 Release: %{_rel}@%{_kernel_ver_str}
98 %{!?_without_dist_kernel:%requires_releq_kernel_up}
99 Requires(post,postun): /sbin/depmod
101 %description -n kernel-cipe
102 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
103 package for an encrypting IP tunnel device. This can be used to build
104 encrypting routers for VPN (Virtual Private Networks) and similar
105 applications. This package contains a kernel module compiled for
106 %{_kernel_ver}%{smpstr}.
108 %description -n kernel-cipe -l pl
109 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
110 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
111 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
112 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
113 skompilowany dla %{_kernel_ver}%.
115 %package -n kernel-smp-cipe
116 Summary: CIPE kernel module
117 Summary(pl): Modu³ j±dra CIPE
118 Release: %{_rel}@%{_kernel_ver_str}
120 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
121 Requires(post,postun): /sbin/depmod
123 %description -n kernel-smp-cipe
124 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
125 package for an encrypting IP tunnel device. This can be used to build
126 encrypting routers for VPN (Virtual Private Networks) and similar
127 applications. This package contains a kernel module compiled for
128 %{_kernel_ver}%{smpstr}.
130 %description -n kernel-smp-cipe -l pl
131 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
132 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
133 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
134 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
135 skompilowany dla %{_kernel_ver}-smp.
146 mv -f conf/aclocal.m4 conf/acinclude.m4
147 %{__aclocal} -I conf --output=conf/aclocal.m4
148 %{__autoconf} --include conf/
151 --with-linux=%{_kernelsrcdir} \
152 --with-ciped=%{_sbindir}/ciped-cb
157 --with-linux=%{_kernelsrcdir} \
158 --with-ciped=%{_sbindir}/ciped-db \
164 mv -f */cip?b.o modules/
168 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
170 --with-linux=%{_kernelsrcdir} \
171 --with-ciped=%{_sbindir}/ciped-cb \
176 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
178 --with-linux=%{_kernelsrcdir} \
179 --with-ciped=%{_sbindir}/ciped-cb \
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
188 $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
189 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
190 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \
191 $RPM_BUILD_ROOT%{_var}/run/cipe \
192 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
194 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
195 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
196 mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
197 install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
198 install */ciped-?b $RPM_BUILD_ROOT%{_sbindir}
199 install cipe.info $RPM_BUILD_ROOT%{_infodir}
200 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
203 rm -rf $RPM_BUILD_ROOT
206 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
209 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
212 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
215 if [ -f /var/lock/subsys/rc-inetd ]; then
216 /etc/rc.d/init.d/rc-inetd reload 1>&2
218 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
221 %postun pkcipe-server
222 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
223 /etc/rc.d/init.d/rc-inetd reload
227 %depmod %{_kernel_ver}
229 %postun -n kernel-cipe
230 %depmod %{_kernel_ver}
232 %post -n kernel-smp-cipe
233 %depmod %{_kernel_ver}smp
235 %postun -n kernel-smp-cipe
236 %depmod %{_kernel_ver}smp
239 %defattr(644,root,root,755)
240 %doc README* tcpdump.patch CHANGES samples
242 %attr(755,root,root) %{_sbindir}/ciped-*
243 %dir %{_sysconfdir}/cipe
244 %attr(755,root,root) %dir %{_var}/run/cipe
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/rsa-keygen
249 %attr(755,root,root) %{_sbindir}/pkcipe
250 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
253 %defattr(644,root,root,755)
254 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
256 %files -n kernel-cipe
257 %defattr(644,root,root,755)
258 /lib/modules/%{_kernel_ver}/misc/cip*.o*
260 %files -n kernel-smp-cipe
261 %defattr(644,root,root,755)
262 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*