]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
- permissions on /etc/cipe/pk directory
[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 Name:           cipe
8 Version:        1.5.2
9 Release:        1
10 License:        GPL
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)
20
21 %define         _sysconfdir     /etc
22
23 %description
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
27 applications.
28
29 %description -l pl
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.
34
35 %package -n kernel%{smpstr}-cipe
36 Summary:        CIPE kernel module
37 Release:        %{release}@%{_kernel_ver_str}
38 Group:          Base/Kernel
39 Group(de):      Grundsätzlich/Kern
40 Group(pl):      Podstawowe/J±dro
41
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}.
48
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}.
55
56 %prep
57 %setup -q
58 %patch0 -p1
59 %patch1 -p1
60
61 %build
62 mv -f conf/aclocal.m4 conf/acinclude.m4
63 aclocal -I conf --output=conf/aclocal.m4
64 autoconf -l conf/
65 %configure \
66         --with-linux=%{_kernelsrcdir} \
67 %if %{smp}
68         --enable-smp
69 %endif
70
71 %{__make} \
72 %if %{smp}
73         KDEFS+=" -D__KERNEL_SMP=1"
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
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
82
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
90
91 %post
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
94
95 %post -n kernel%{smpstr}-cipe
96 /sbin/depmod -a
97
98 %postun
99 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
100
101 %postun -n kernel%{smpstr}-cipe
102 /sbin/depmod -a
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc *.gz samples
110 %{_infodir}/*
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
115
116 %files -n kernel%{smpstr}-cipe
117 %defattr(644,root,root,755)
118 %attr(600,root,root) /lib/modules/*/misc/cipcb.o
This page took 0.060349 seconds and 3 git commands to generate.