]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
b158abbd46e8c7ee231010e3c6e903ac6129f8df
[packages/cipe.git] / cipe.spec
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}
5
6 Summary:        CIPE - encrypted IP over UDP tunneling
7 Summary(pl):    CIPE - szyfrowany tunel IP po UDP
8 Name:           cipe
9 Version:        1.5.2
10 Release:        2
11 License:        GPL
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 Prereq:         %{_bindir}/openssl
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  openssl-devel >= 0.9.6
22 BuildRequires:  %{_bindir}/openssl
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sysconfdir     /etc
26
27 %description
28 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
29 package for an encrypting IP tunnel device. This can be used to build
30 encrypting routers for VPN (Virtual Private Networks) and similar
31 applications.
32
33 %description -l pl
34 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
35 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
36 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
37 podobnych zastosowaniach.
38
39 %package -n kernel%{smpstr}-cipe
40 Summary:        CIPE kernel module
41 Summary(pl):    Modu³ j±dra CIPE
42 Release:        %{release}@%{_kernel_ver_str}
43 Group:          Base/Kernel
44 Group(de):      Grundsätzlich/Kern
45 Group(pl):      Podstawowe/J±dro
46 Prereq:         /sbin/depmod
47
48 %description -n kernel%{smpstr}-cipe
49 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
50 package for an encrypting IP tunnel device. This can be used to build
51 encrypting routers for VPN (Virtual Private Networks) and similar
52 applications. This package contains a kernel module compiled for
53 %{_kernel_ver}%{smpstr}.
54
55 %description -n kernel%{smpstr}-cipe -l pl
56 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
57 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
58 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
59 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
60 skompilowany dla %{_kernel_ver}%{smpstr}.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch1 -p1
66
67 %build
68 mv -f conf/aclocal.m4 conf/acinclude.m4
69 aclocal -I conf --output=conf/aclocal.m4
70 autoconf -l conf/
71 %if %{smp}
72 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
73 %endif
74 %configure \
75         --with-linux=%{_kernelsrcdir} \
76         --with-ciped=%{_sbindir}/ciped-cb \
77 %if %{smp}
78         --enable-smp
79 %endif
80
81 %{__make}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
87         $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
88         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
89         $RPM_BUILD_ROOT%{_var}/run/cipe
90
91 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
92 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
93 install */cipcb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
94 install */ciped-cb $RPM_BUILD_ROOT%{_sbindir}
95 install cipe.info $RPM_BUILD_ROOT%{_infodir}
96 gzip -9nf README* tcpdump.patch CHANGES
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post
102 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
103 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
104
105 %postun
106 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
107
108 %post -n kernel%{smpstr}-cipe
109 /sbin/depmod -a
110
111 %postun -n kernel%{smpstr}-cipe
112 /sbin/depmod -a
113
114 %files
115 %defattr(644,root,root,755)
116 %doc *.gz samples
117 %{_infodir}/*
118 %attr(755,root,root) %{_sbindir}/*
119 %attr(755,root,root) %{_bindir}/*
120 %dir %{_sysconfdir}/cipe
121 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
122 %attr(755,root,root) %dir %{_var}/run/cipe
123
124 %files -n kernel%{smpstr}-cipe
125 %defattr(644,root,root,755)
126 %attr(600,root,root) /lib/modules/*/misc/cipcb.o
This page took 0.059678 seconds and 3 git commands to generate.