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
7 Summary(pl): CIPE - szyfrowany tunel IP po UDP
12 Group: Networking/Daemons
13 Group(de): Netzwerkwesen/Server
14 Group(pl): Sieciowe/Serwery
15 Source0: http://sites.inka.de/bigred/sw/%{name}-%{version}.tar.gz
16 Patch0: %{name}-autoconf.patch
17 Patch1: %{name}-makefile.patch
18 BuildRequires: openssl-devel >= 0.9.6
19 BuildRequires: %{_bindir}/openssl
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _sysconfdir /etc
25 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
26 package for an encrypting IP tunnel device. This can be used to build
27 encrypting routers for VPN (Virtual Private Networks) and similar
31 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
32 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
33 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
34 podobnych zastosowaniach.
36 %package -n kernel%{smpstr}-cipe
37 Summary: CIPE kernel module
38 Summary(pl): Modu³ j±dra CIPE
39 Release: %{release}@%{_kernel_ver_str}
41 Group(de): Grundsätzlich/Kern
42 Group(pl): Podstawowe/J±dro
45 %description -n kernel%{smpstr}-cipe
46 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
47 package for an encrypting IP tunnel device. This can be used to build
48 encrypting routers for VPN (Virtual Private Networks) and similar
49 applications. This package contains a kernel module compiled for
50 %{_kernel_ver}%{smpstr}.
52 %description -n kernel%{smpstr}-cipe -l pl
53 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
54 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
55 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
56 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
57 skompilowany dla %{_kernel_ver}%{smpstr}.
65 mv -f conf/aclocal.m4 conf/acinclude.m4
66 aclocal -I conf --output=conf/aclocal.m4
69 --with-linux=%{_kernelsrcdir} \
70 --with-ciped=%{_sbindir}/ciped-cb \
77 KDEFS+=" -D__KERNEL_SMP=1"
81 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
84 $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
85 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
86 $RPM_BUILD_ROOT%{_var}/run/cipe
88 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
89 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
90 install */cipcb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
91 install */ciped-cb $RPM_BUILD_ROOT%{_sbindir}
92 install cipe.info $RPM_BUILD_ROOT%{_infodir}
93 gzip -9nf README* tcpdump.patch CHANGES
96 rm -rf $RPM_BUILD_ROOT
99 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
100 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
103 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
105 %post -n kernel%{smpstr}-cipe
108 %postun -n kernel%{smpstr}-cipe
112 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_sbindir}/*
116 %attr(755,root,root) %{_bindir}/*
117 %dir %{_sysconfdir}/cipe
118 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
119 %attr(755,root,root) %dir %{_var}/run/cipe
121 %files -n kernel%{smpstr}-cipe
122 %defattr(644,root,root,755)
123 %attr(600,root,root) /lib/modules/*/misc/cipcb.o