]> git.pld-linux.org Git - packages/cipe.git/blob - cipe.spec
- fixed depmod in %%post and %%postun when build with _without_dist_kernel
[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 Source1:        %{name}.inetd
15 Patch0:         %{name}-autoconf.patch
16 Patch1:         %{name}-makefile.patch
17 Patch2:         %{name}-pk%{name}-real-peer.patch
18 Patch3:         %{name}-get_fast_time.patch
19 Patch4:         %{name}-alpha.patch
20 URL:            http://sites.inka.de/bigred/devel/cipe.html
21 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  openssl-devel >= 0.9.7
25 BuildRequires:  /usr/bin/openssl
26 BuildRequires:  %{kgcc_package}
27
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _sysconfdir     /etc
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
188 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
189         $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \
190         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \
191         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \
192         $RPM_BUILD_ROOT%{_var}/run/cipe \
193         $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd
194
195 install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir}
196 install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir}
197 mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
198 install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
199 install */ciped-?b $RPM_BUILD_ROOT%{_sbindir}
200 install cipe.info $RPM_BUILD_ROOT%{_infodir}
201 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %post
207 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
208
209 %postun
210 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
211
212 %post pkcipe-client
213 [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity
214
215 %post pkcipe-server
216 if [ -f /var/lock/subsys/rc-inetd ]; then
217         /etc/rc.d/init.d/rc-inetd reload 1>&2
218 else
219         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
220 fi
221
222 %postun pkcipe-server
223 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
224         /etc/rc.d/init.d/rc-inetd reload
225 fi
226
227 %post   -n kernel-cipe
228 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
229
230 %postun -n kernel-cipe
231 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
232
233 %post   -n kernel-smp-cipe
234 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
235
236 %postun -n kernel-smp-cipe
237 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
238
239 %files
240 %defattr(644,root,root,755)
241 %doc README* tcpdump.patch CHANGES samples
242 %{_infodir}/*
243 %attr(755,root,root) %{_sbindir}/ciped-*
244 %dir %{_sysconfdir}/cipe
245 %attr(755,root,root) %dir %{_var}/run/cipe
246
247 %files pkcipe-client
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_bindir}/rsa-keygen
250 %attr(755,root,root) %{_sbindir}/pkcipe
251 %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk
252
253 %files pkcipe-server
254 %defattr(644,root,root,755)
255 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe
256
257 %files -n kernel-cipe
258 %defattr(644,root,root,755)
259 /lib/modules/%{_kernel_ver}/misc/cip*.o*
260
261 %files -n kernel-smp-cipe
262 %defattr(644,root,root,755)
263 /lib/modules/%{_kernel_ver}smp/misc/cip*.o*
This page took 0.090589 seconds and 4 git commands to generate.