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