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}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _sysconfdir /etc
36 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
37 package for an encrypting IP tunnel device. This can be used to build
38 encrypting routers for VPN (Virtual Private Networks) and similar
42 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
43 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
44 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
45 podobnych zastosowaniach.
47 %package pkcipe-client
48 Summary: The PKCIPE public key tool for CIPE
49 Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
50 Group: Networking/Daemons
51 Prereq: /usr/bin/openssl
52 Requires: %{name} = %{version}
53 Obsoletes: %{name}-pkcipe
55 %description pkcipe-client
56 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
57 package for an encrypting IP tunnel device. This can be used to build
58 encrypting routers for VPN (Virtual Private Networks) and similar
59 applications. This package contains PKCIPE, which simplifies setup of
60 CIPE tunnels by using autoconfiguration and public/private key
63 %description pkcipe-client -l pl
64 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
65 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
66 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
67 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE, który uprasza
68 ustawienie tuneli CIPE przez korzystanie z autokonfiguracji oraz
69 mechanizmów kluczy publicznych/prywatnych.
71 %package pkcipe-server
72 Summary: The PKCIPE public key tool for CIPE - server side
73 Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
74 Group: Networking/Daemons
75 Requires: %{name}-pkcipe-client = %{version}
78 %description pkcipe-server
79 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
80 package for an encrypting IP tunnel device. This can be used to build
81 encrypting routers for VPN (Virtual Private Networks) and similar
82 applications. This package contains server part PKCIPE, which
83 simplifies setup of CIPE tunnels by using autoconfiguration and
84 public/private key mechanisms.
86 %description pkcipe-server -l pl
87 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
88 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
89 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
90 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE do u¿ycia po
91 stronie serwera, który uprasza ustawienie tuneli CIPE przez
92 korzystanie z autokonfiguracji oraz mechanizmów kluczy
93 publicznych/prywatnych.
95 %package -n kernel-cipe
96 Summary: CIPE kernel module
97 Summary(pl): Modu³ j±dra CIPE
98 Release: %{_rel}@%{_kernel_ver_str}
100 %{!?_without_dist_kernel:%requires_releq_kernel_up}
101 Requires(post,postun): /sbin/depmod
103 %description -n kernel-cipe
104 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
105 package for an encrypting IP tunnel device. This can be used to build
106 encrypting routers for VPN (Virtual Private Networks) and similar
107 applications. This package contains a kernel module compiled for
108 %{_kernel_ver}%{smpstr}.
110 %description -n kernel-cipe -l pl
111 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
112 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
113 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
114 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
115 skompilowany dla %{_kernel_ver}%.
117 %package -n kernel-smp-cipe
118 Summary: CIPE kernel module
119 Summary(pl): Modu³ j±dra CIPE
120 Release: %{_rel}@%{_kernel_ver_str}
122 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
123 Requires(post,postun): /sbin/depmod
125 %description -n kernel-smp-cipe
126 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
127 package for an encrypting IP tunnel device. This can be used to build
128 encrypting routers for VPN (Virtual Private Networks) and similar
129 applications. This package contains a kernel module compiled for
130 %{_kernel_ver}%{smpstr}.
132 %description -n kernel-smp-cipe -l pl
133 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
134 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
135 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
136 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
137 skompilowany dla %{_kernel_ver}-smp.
148 mv -f conf/aclocal.m4 conf/acinclude.m4
149 %{__aclocal} -I conf --output=conf/aclocal.m4
150 %{__autoconf} --include conf/
153 --with-linux=%{_kernelsrcdir} \
154 --with-ciped=%{_sbindir}/ciped-cb
159 --with-linux=%{_kernelsrcdir} \
160 --with-ciped=%{_sbindir}/ciped-db \
166 mv -f */cip?b.o modules/
170 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
172 --with-linux=%{_kernelsrcdir} \
173 --with-ciped=%{_sbindir}/ciped-cb \
178 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
180 --with-linux=%{_kernelsrcdir} \
181 --with-ciped=%{_sbindir}/ciped-cb \
188 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
191 $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
192 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
193 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \
194 $RPM_BUILD_ROOT%{_var}/run/cipe \
195 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
197 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
198 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
199 mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
200 install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
201 install */ciped-?b $RPM_BUILD_ROOT%{_sbindir}
202 install cipe.info $RPM_BUILD_ROOT%{_infodir}
203 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
206 rm -rf $RPM_BUILD_ROOT
209 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
212 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
215 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
218 if [ -f /var/lock/subsys/rc-inetd ]; then
219 /etc/rc.d/init.d/rc-inetd reload 1>&2
221 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
224 %postun pkcipe-server
225 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
226 /etc/rc.d/init.d/rc-inetd reload
230 %depmod %{_kernel_ver}
232 %postun -n kernel-cipe
233 %depmod %{_kernel_ver}
235 %post -n kernel-smp-cipe
236 %depmod %{_kernel_ver}smp
238 %postun -n kernel-smp-cipe
239 %depmod %{_kernel_ver}smp
242 %defattr(644,root,root,755)
243 %doc README* tcpdump.patch CHANGES samples
245 %attr(755,root,root) %{_sbindir}/ciped-*
246 %dir %{_sysconfdir}/cipe
247 %attr(755,root,root) %dir %{_var}/run/cipe
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/rsa-keygen
252 %attr(755,root,root) %{_sbindir}/pkcipe
253 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
256 %defattr(644,root,root,755)
257 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
259 %files -n kernel-cipe
260 %defattr(644,root,root,755)
261 /lib/modules/%{_kernel_ver}/misc/cip*.o*
263 %files -n kernel-smp-cipe
264 %defattr(644,root,root,755)
265 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*