1 %define _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
2 %define _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
3 %define smpstr %{?_with_smp:-smp}
4 %define smp %{?_with_smp:1}%{!?_with_smp:0}
6 Summary: CIPE - encrypted IP over UDP tunneling
11 Group: Networking/Daemons
12 Group(de): Netzwerkwesen/Server
13 Group(pl): Sieciowe/Serwery
14 Source0: http://sites.inka.de/bigred/sw/%{name}-%{version}.tar.gz
15 Patch0: %{name}-autoconf.patch
16 Patch1: %{name}-makefile.patch
17 BuildRequires: openssl-devel >= 0.9.6
18 BuildRequires: %{_bindir}/openssl
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _sysconfdir /etc
24 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
25 package for an encrypting IP tunnel device. This can be used to build
26 encrypting routers for VPN (Virtual Private Networks) and similar
30 CIPE (naswa to skrót od *Crypto IP Encapsulation*) to pakiet do
31 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
32 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
33 podobnych zastosowaniach.
35 %package -n kernel%{smpstr}-cipe
36 Summary: CIPE kernel module
37 Release: %{release}@%{_kernel_ver_str}
39 Group(de): Grundsätzlich/Kern
40 Group(pl): Podstawowe/J±dro
42 %description -n kernel%{smpstr}-cipe
43 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
44 package for an encrypting IP tunnel device. This can be used to build
45 encrypting routers for VPN (Virtual Private Networks) and similar
46 applications. This package contains a kernel module compiled for
47 %{_kernel_ver}%{smpstr}.
49 %description -n kernel%{smpstr}-cipe -l pl
50 CIPE (naswa to skrót od *Crypto IP Encapsulation*) to pakiet do
51 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
52 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
53 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
54 skompilowany dla %{_kernel_ver}%{smpstr}.
62 mv -f conf/aclocal.m4 conf/acinclude.m4
63 aclocal -I conf --output=conf/aclocal.m4
66 --with-linux=%{_kernelsrcdir} \
73 KDEFS+=" -D__KERNEL_SMP=1"
77 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
80 $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
81 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
83 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
84 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
85 install */cipcb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
86 install */ciped-cb $RPM_BUILD_ROOT%{_sbindir}
87 install cipe.info $RPM_BUILD_ROOT%{_infodir}
88 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk
89 gzip -9nf README* tcpdump.patch CHANGES
92 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
93 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
95 %post -n kernel%{smpstr}-cipe
99 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
101 %postun -n kernel%{smpstr}-cipe
105 rm -rf $RPM_BUILD_ROOT
108 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_sbindir}/*
112 %attr(755,root,root) %{_bindir}/*
113 %dir %{_sysconfdir}/cipe
114 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
116 %files -n kernel%{smpstr}-cipe
117 %defattr(644,root,root,755)
118 %attr(600,root,root) /lib/modules/*/misc/cipcb.o