]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
f5fbf8ab5a5d679de800dd2e1b9770e8d30d4db5
[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:        3
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 Source1:        %{name}.inetd
17 Patch0:         %{name}-autoconf.patch
18 Patch1:         %{name}-makefile.patch
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 pkcipe
40 Summary:        The PKCIPE public key tool for CIPE
41 Summary(pl):    PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
42 Group:          Networking/Daemons
43 Group(de):      Netzwerkwesen/Server
44 Group(pl):      Sieciowe/Serwery
45 Prereq:         %{_bindir}/openssl
46 Requires:       %{name} = %{version}
47
48 %description pkcipe
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.
53 This package contains PKCIPE, which simplifies setup of CIPE tunnels by
54 using autoconfiguration and public/private key mechanisms.
55
56 %description pkcipe -l pl
57 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
58 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
59 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
60 podobnych zastosowaniach.
61 Ten pakiet zawiera PKCIPE, który uprasza ustawienie tuneli CIPE przez
62 korzystanie z autokonfiguracji oraz mechanizmów kluczy
63 publicznych/prywatnych.
64
65 %package -n kernel%{smpstr}-cipe
66 Summary:        CIPE kernel module
67 Summary(pl):    Modu³ j±dra CIPE
68 Release:        %{release}@%{_kernel_ver_str}
69 Group:          Base/Kernel
70 Group(de):      Grundsätzlich/Kern
71 Group(pl):      Podstawowe/J±dro
72 Prereq:         /sbin/depmod
73
74 %description -n kernel%{smpstr}-cipe
75 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
76 package for an encrypting IP tunnel device. This can be used to build
77 encrypting routers for VPN (Virtual Private Networks) and similar
78 applications. This package contains a kernel module compiled for
79 %{_kernel_ver}%{smpstr}.
80
81 %description -n kernel%{smpstr}-cipe -l pl
82 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
83 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
84 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
85 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
86 skompilowany dla %{_kernel_ver}%{smpstr}.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92
93 %build
94 mv -f conf/aclocal.m4 conf/acinclude.m4
95 aclocal -I conf --output=conf/aclocal.m4
96 autoconf -l conf/
97 %if %{smp}
98 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
99 %endif
100 %configure \
101         --with-linux=%{_kernelsrcdir} \
102         --with-ciped=%{_sbindir}/ciped-cb \
103 %if %{smp}
104         --enable-smp
105 %endif
106
107 %{__make}
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
113         $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
114         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
115         $RPM_BUILD_ROOT%{_var}/run/cipe \
116         $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
117
118 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
119 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
120 install */cipcb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
121 install */ciped-cb $RPM_BUILD_ROOT%{_sbindir}
122 install cipe.info $RPM_BUILD_ROOT%{_infodir}
123 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
124
125 gzip -9nf README* tcpdump.patch CHANGES
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %post
131 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
132
133 %postun
134 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
135
136 %post pkcipe
137 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
138 if [ -f /var/lock/subsys/rc-inetd ]; then
139         /etc/rc.d/init.d/rc-inetd reload 1>&2
140 else
141         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
142 fi
143
144 %postun pkcipe
145 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
146         /etc/rc.d/init.d/rc-inetd reload
147 fi
148
149 %post -n kernel%{smpstr}-cipe
150 /sbin/depmod -a
151
152 %postun -n kernel%{smpstr}-cipe
153 /sbin/depmod -a
154
155 %files
156 %defattr(644,root,root,755)
157 %doc *.gz samples
158 %{_infodir}/*
159 %attr(755,root,root) %{_sbindir}/ciped-cb
160 %dir %{_sysconfdir}/cipe
161 %attr(755,root,root) %dir %{_var}/run/cipe
162
163 %files pkcipe
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_bindir}/rsa-keygen
166 %attr(755,root,root) %{_sbindir}/pkcipe
167 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
168 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
169
170 %files -n kernel%{smpstr}-cipe
171 %defattr(644,root,root,755)
172 %attr(600,root,root) /lib/modules/*/misc/cipcb.o
This page took 0.982734 seconds and 2 git commands to generate.