]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
- invoke fix-info-dir via /sbin/postshell where possible to avoid extra /bin/sh dep
[packages/cipe.git] / cipe.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without kernel from distribution
4 #
5 %define _rel    1
6 Summary:        CIPE - encrypted IP over UDP tunneling
7 Summary(pl.UTF-8):      CIPE - szyfrowany tunel IP po UDP
8 Name:           cipe
9 Version:        1.5.4
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 BuildRequires:  %{kgcc_package}
23 BuildRequires:  /usr/bin/openssl
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 %{?with_dist_kernel:BuildRequires:      kernel-headers}
27 BuildRequires:  openssl-devel >= 0.9.7d
28 BuildRequires:  rpmbuild(macros) >= 1.268
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.UTF-8
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.UTF-8):      PKCIPE - narzędzie do wykorzystania kluczy publicznych w CIPE
48 Group:          Networking/Daemons
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       /usr/bin/openssl
51 Obsoletes:      cipe-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.UTF-8
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.UTF-8):      PKCIPE - narzędzie do wykorzystania kluczy publicznych w CIPE
72 Group:          Networking/Daemons
73 Requires:       %{name}-pkcipe-client = %{version}-%{release}
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.UTF-8
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.UTF-8):      Moduł jądra CIPE
96 Release:        %{_rel}@%{_kernel_ver_str}
97 Group:          Base/Kernel
98 %{?with_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}.
107
108 %description -n kernel-cipe -l pl.UTF-8
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.UTF-8):      Moduł jądra CIPE
118 Release:        %{_rel}@%{_kernel_ver_str}
119 Group:          Base/Kernel
120 %{?with_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}smp.
129
130 %description -n kernel-smp-cipe -l pl.UTF-8
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   -p      /sbin/postshell
206 -/usr/sbin/fix-info-dir -c %{_infodir}
207
208 %postun -p      /sbin/postshell
209 -/usr/sbin/fix-info-dir -c %{_infodir}
210
211 %post pkcipe-client
212 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
213
214 %post pkcipe-server
215 %service -q rc-inetd reload
216
217 %postun pkcipe-server
218 if [ "$1" = "0" ]; then
219         %service -q rc-inetd reload
220 fi
221
222 %post   -n kernel-cipe
223 %depmod %{_kernel_ver}
224
225 %postun -n kernel-cipe
226 %depmod %{_kernel_ver}
227
228 %post   -n kernel-smp-cipe
229 %depmod %{_kernel_ver}smp
230
231 %postun -n kernel-smp-cipe
232 %depmod %{_kernel_ver}smp
233
234 %files
235 %defattr(644,root,root,755)
236 %doc README* tcpdump.patch CHANGES samples
237 %attr(755,root,root) %{_sbindir}/ciped-*
238 %dir %{_sysconfdir}/cipe
239 %attr(755,root,root) %dir %{_var}/run/cipe
240 %{_infodir}/*.info*
241
242 %files pkcipe-client
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/rsa-keygen
245 %attr(755,root,root) %{_sbindir}/pkcipe
246 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
247
248 %files pkcipe-server
249 %defattr(644,root,root,755)
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/pkcipe
251
252 %files -n kernel-cipe
253 %defattr(644,root,root,755)
254 /lib/modules/%{_kernel_ver}/misc/cip*.o*
255
256 %files -n kernel-smp-cipe
257 %defattr(644,root,root,755)
258 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*
This page took 0.116033 seconds and 3 git commands to generate.