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 Source1: %{name}.inetd
15 Patch0: %{name}-autoconf.patch
16 Patch1: %{name}-makefile.patch
17 Patch2: %{name}-pk%{name}-real-peer.patch
18 Patch3: %{name}-get_fast_time.patch
19 Patch4: %{name}-alpha.patch
20 URL: http://sites.inka.de/bigred/devel/cipe.html
21 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: openssl-devel >= 0.9.7
25 BuildRequires: /usr/bin/openssl
26 BuildRequires: %{kgcc_package}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sysconfdir /etc
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
188 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
189 $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
190 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
191 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \
192 $RPM_BUILD_ROOT%{_var}/run/cipe \
193 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
195 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
196 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
197 mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
198 install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
199 install */ciped-?b $RPM_BUILD_ROOT%{_sbindir}
200 install cipe.info $RPM_BUILD_ROOT%{_infodir}
201 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
204 rm -rf $RPM_BUILD_ROOT
207 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
210 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
213 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
216 if [ -f /var/lock/subsys/rc-inetd ]; then
217 /etc/rc.d/init.d/rc-inetd reload 1>&2
219 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
222 %postun pkcipe-server
223 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
224 /etc/rc.d/init.d/rc-inetd reload
228 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
230 %postun -n kernel-cipe
231 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
233 %post -n kernel-smp-cipe
234 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
236 %postun -n kernel-smp-cipe
237 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
240 %defattr(644,root,root,755)
241 %doc README* tcpdump.patch CHANGES samples
243 %attr(755,root,root) %{_sbindir}/ciped-*
244 %dir %{_sysconfdir}/cipe
245 %attr(755,root,root) %dir %{_var}/run/cipe
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_bindir}/rsa-keygen
250 %attr(755,root,root) %{_sbindir}/pkcipe
251 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
254 %defattr(644,root,root,755)
255 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
257 %files -n kernel-cipe
258 %defattr(644,root,root,755)
259 /lib/modules/%{_kernel_ver}/misc/cip*.o*
261 %files -n kernel-smp-cipe
262 %defattr(644,root,root,755)
263 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*