]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
5b2a0731873c994dc98f298097f391ae6095caa8
[packages/cipe.git] / cipe.spec
1 #
2 # Conditional build:
3 # _without_dist_kernel  - without kernel from distribution
4 #
5 Summary:        CIPE - encrypted IP over UDP tunneling
6 Summary(pl):    CIPE - szyfrowany tunel IP po UDP
7 Name:           cipe
8 Version:        1.5.4
9 %define _rel    1
10 Release:        %{_rel}
11 License:        GPL
12 Group:          Networking/Daemons
13 Source0:        http://sites.inka.de/bigred/sw/%{name}-%{version}.tar.gz
14 # Source0-md5:  9d88f2d090fcafcd0e2fa73b018b6e16
15 Source1:        %{name}.inetd
16 Patch0:         %{name}-autoconf.patch
17 Patch1:         %{name}-makefile.patch
18 Patch2:         %{name}-pk%{name}-real-peer.patch
19 Patch3:         %{name}-get_fast_time.patch
20 Patch4:         %{name}-alpha.patch
21 URL:            http://sites.inka.de/bigred/devel/cipe.html
22 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  openssl-devel >= 0.9.7
26 BuildRequires:  /usr/bin/openssl
27 BuildRequires:  rpmbuild(macros) >= 1.118
28 BuildRequires:  %{kgcc_package}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         __cc            %{kgcc}
32
33 %description
34 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
35 package for an encrypting IP tunnel device. This can be used to build
36 encrypting routers for VPN (Virtual Private Networks) and similar
37 applications.
38
39 %description -l pl
40 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
41 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
42 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
43 podobnych zastosowaniach.
44
45 %package pkcipe-client
46 Summary:        The PKCIPE public key tool for CIPE
47 Summary(pl):    PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
48 Group:          Networking/Daemons
49 Prereq:         /usr/bin/openssl
50 Requires:       %{name} = %{version}
51 Obsoletes:      %{name}-pkcipe
52
53 %description pkcipe-client
54 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
55 package for an encrypting IP tunnel device. This can be used to build
56 encrypting routers for VPN (Virtual Private Networks) and similar
57 applications. This package contains PKCIPE, which simplifies setup of
58 CIPE tunnels by using autoconfiguration and public/private key
59 mechanisms.
60
61 %description pkcipe-client -l pl
62 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
63 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
64 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
65 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE, który uprasza
66 ustawienie tuneli CIPE przez korzystanie z autokonfiguracji oraz
67 mechanizmów kluczy publicznych/prywatnych.
68
69 %package pkcipe-server
70 Summary:        The PKCIPE public key tool for CIPE - server side
71 Summary(pl):    PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE
72 Group:          Networking/Daemons
73 Requires:       %{name}-pkcipe-client = %{version}
74 Requires:       inetdaemon
75
76 %description pkcipe-server
77 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
78 package for an encrypting IP tunnel device. This can be used to build
79 encrypting routers for VPN (Virtual Private Networks) and similar
80 applications. This package contains server part PKCIPE, which
81 simplifies setup of CIPE tunnels by using autoconfiguration and
82 public/private key mechanisms.
83
84 %description pkcipe-server -l pl
85 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
86 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
87 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
88 podobnych zastosowaniach. Ten pakiet zawiera PKCIPE do u¿ycia po
89 stronie serwera, który uprasza ustawienie tuneli CIPE przez
90 korzystanie z autokonfiguracji oraz mechanizmów kluczy
91 publicznych/prywatnych.
92
93 %package -n kernel-cipe
94 Summary:        CIPE kernel module
95 Summary(pl):    Modu³ j±dra CIPE
96 Release:        %{_rel}@%{_kernel_ver_str}
97 Group:          Base/Kernel
98 %{!?_without_dist_kernel:%requires_releq_kernel_up}
99 Requires(post,postun):  /sbin/depmod
100
101 %description -n kernel-cipe
102 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
103 package for an encrypting IP tunnel device. This can be used to build
104 encrypting routers for VPN (Virtual Private Networks) and similar
105 applications. This package contains a kernel module compiled for
106 %{_kernel_ver}%{smpstr}.
107
108 %description -n kernel-cipe -l pl
109 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
110 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
111 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
112 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
113 skompilowany dla %{_kernel_ver}%.
114
115 %package -n kernel-smp-cipe
116 Summary:        CIPE kernel module
117 Summary(pl):    Modu³ j±dra CIPE
118 Release:        %{_rel}@%{_kernel_ver_str}
119 Group:          Base/Kernel
120 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
121 Requires(post,postun):  /sbin/depmod
122
123 %description -n kernel-smp-cipe
124 CIPE (the name is shortened from *Crypto IP Encapsulation*) is a
125 package for an encrypting IP tunnel device. This can be used to build
126 encrypting routers for VPN (Virtual Private Networks) and similar
127 applications. This package contains a kernel module compiled for
128 %{_kernel_ver}%{smpstr}.
129
130 %description -n kernel-smp-cipe -l pl
131 CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do
132 tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania
133 routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i
134 podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela
135 skompilowany dla %{_kernel_ver}-smp.
136
137 %prep
138 %setup -q
139 %patch0 -p1
140 %patch1 -p1
141 %patch2 -p1
142 # %patch3 -p1
143 %patch4 -p1
144
145 %build
146 mv -f conf/aclocal.m4 conf/acinclude.m4
147 %{__aclocal} -I conf --output=conf/aclocal.m4
148 %{__autoconf} --include conf/
149
150 %configure \
151         --with-linux=%{_kernelsrcdir} \
152         --with-ciped=%{_sbindir}/ciped-cb
153
154 %{__make} modules
155
156 %configure \
157         --with-linux=%{_kernelsrcdir} \
158         --with-ciped=%{_sbindir}/ciped-db \
159         --enable-protocol=4
160
161 %{__make} modules
162
163 mkdir modules/
164 mv -f */cip?b.o modules/
165
166 %{__make} clean
167
168 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
169 %configure \
170         --with-linux=%{_kernelsrcdir} \
171         --with-ciped=%{_sbindir}/ciped-cb \
172         --enable-smp
173
174 %{__make}
175
176 DEFS="-D__SMP__ -D__KERNEL_SMP=1" \
177 %configure \
178         --with-linux=%{_kernelsrcdir} \
179         --with-ciped=%{_sbindir}/ciped-cb \
180         --enable-smp \
181         --enable-protocol=4
182
183 %{__make}
184
185 %install
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
188         $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
189         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
190         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \
191         $RPM_BUILD_ROOT%{_var}/run/cipe \
192         $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
193
194 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
195 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
196 mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
197 install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
198 install */ciped-?b $RPM_BUILD_ROOT%{_sbindir}
199 install cipe.info $RPM_BUILD_ROOT%{_infodir}
200 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post
206 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
207
208 %postun
209 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
210
211 %post pkcipe-client
212 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
213
214 %post pkcipe-server
215 if [ -f /var/lock/subsys/rc-inetd ]; then
216         /etc/rc.d/init.d/rc-inetd reload 1>&2
217 else
218         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
219 fi
220
221 %postun pkcipe-server
222 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
223         /etc/rc.d/init.d/rc-inetd reload
224 fi
225
226 %post   -n kernel-cipe
227 %depmod %{_kernel_ver}
228
229 %postun -n kernel-cipe
230 %depmod %{_kernel_ver}
231
232 %post   -n kernel-smp-cipe
233 %depmod %{_kernel_ver}smp
234
235 %postun -n kernel-smp-cipe
236 %depmod %{_kernel_ver}smp
237
238 %files
239 %defattr(644,root,root,755)
240 %doc README* tcpdump.patch CHANGES samples
241 %{_infodir}/*
242 %attr(755,root,root) %{_sbindir}/ciped-*
243 %dir %{_sysconfdir}/cipe
244 %attr(755,root,root) %dir %{_var}/run/cipe
245
246 %files pkcipe-client
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/rsa-keygen
249 %attr(755,root,root) %{_sbindir}/pkcipe
250 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
251
252 %files pkcipe-server
253 %defattr(644,root,root,755)
254 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
255
256 %files -n kernel-cipe
257 %defattr(644,root,root,755)
258 /lib/modules/%{_kernel_ver}/misc/cip*.o*
259
260 %files -n kernel-smp-cipe
261 %defattr(644,root,root,755)
262 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*
This page took 0.105143 seconds and 3 git commands to generate.