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