]> git.pld-linux.org Git - packages/openssh.git/blob - openssh.spec
- rel 2
[packages/openssh.git] / openssh.spec
1 #
2 # Conditional build:    
3 # _without_gnome - without gnome-askpass utility
4 # _without_embed - don't build uClibc version
5
6 Summary:        OpenSSH free Secure Shell (SSH) implementation
7 Summary(pl):    Publicznie dostêpna implementacja bezpiecznego shella (SSH)
8 Name:           openssh
9 Version:        3.0.2p1
10 Release:        2
11 License:        BSD
12 Group:          Applications/Networking
13 Group(de):      Applikationen/Netzwerkwesen
14 Group(pl):      Aplikacje/Sieciowe
15 Source0:        ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
16 Source1:        %{name}d.conf
17 Source2:        %{name}.conf
18 Source3:        %{name}d.init
19 Source4:        %{name}d.pamd
20 Source5:        %{name}.sysconfig
21 Source6:        passwd.pamd
22 Patch0:         %{name}-libwrap.patch
23 Patch1:         %{name}-no_libnsl.patch
24 Patch2:         %{name}-no-openssl-ver-check.patch
25 Patch3:         %{name}-set_12.patch
26 URL:            http://www.openssh.com/
27 BuildRequires:  XFree86-devel
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 %{!?_without_gnome:BuildRequires: gnome-libs-devel}
31 BuildRequires:  openssl-devel >= 0.9.6a
32 BuildRequires:  pam-devel
33 BuildRequires:  zlib-devel
34 BuildRequires:  libwrap-devel
35 BuildRequires:  perl
36 %if %{!?_without_embed:1}%{?_without_embed:0}
37 BuildRequires:  uClibc-devel
38 BuildRequires:  uClibc-static
39 BuildRequires:  openssl-devel-embed
40 BuildRequires:  zlib-devel-embed
41 %endif
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Prereq:         openssl
44 Obsoletes:      ssh
45
46 %define embed_path      /usr/lib/embed
47 %define embed_cc        %{_arch}-uclibc-cc
48 %define embed_cflags    %{rpmcflags} -Os
49
50 %define embed_binaries  ssh scp sshd ssh-keygen
51
52 %define         _sysconfdir     /etc/ssh
53 %define         _libexecdir     %{_libdir}/%{name}
54
55 %description
56 Ssh (Secure Shell) a program for logging into a remote machine and for
57 executing commands in a remote machine. It is intended to replace
58 rlogin and rsh, and provide secure encrypted communications between
59 two untrusted hosts over an insecure network. X11 connections and
60 arbitrary TCP/IP ports can also be forwarded over the secure channel.
61
62 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
63 it up to date in terms of security and features, as well as removing
64 all patented algorithms to seperate libraries (OpenSSL).
65
66 This package includes the core files necessary for both the OpenSSH
67 client and server. To make this package useful, you should also
68 install openssh-clients, openssh-server, or both.
69
70 %description -l pl
71 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
72 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
73 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
74 pomiedzy dwoma hostami.
75
76 %package clients
77 Summary:        OpenSSH Secure Shell protocol clients
78 Summary(pl):    Klienci protoko³u Secure Shell
79 Requires:       openssh
80 Group:          Applications/Networking
81 Group(de):      Applikationen/Netzwerkwesen
82 Group(pl):      Aplikacje/Sieciowe
83 Obsoletes:      ssh-clients
84 Requires:       %{name} = %{version}
85
86 %description clients
87 Ssh (Secure Shell) a program for logging into a remote machine and for
88 executing commands in a remote machine. It is intended to replace
89 rlogin and rsh, and provide secure encrypted communications between
90 two untrusted hosts over an insecure network. X11 connections and
91 arbitrary TCP/IP ports can also be forwarded over the secure channel.
92
93 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
94 it up to date in terms of security and features, as well as removing
95 all patented algorithms to seperate libraries (OpenSSL).
96
97 This package includes the clients necessary to make encrypted
98 connections to SSH servers.
99
100 %description -l pl clients
101 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
102 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
103 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
104 pomiedzy dwoma hostami.
105
106 Ten pakiet zawiera klientów s³u¿±cych do ³±czenia siê z serwerami SSH.
107
108 %package server
109 Summary:        OpenSSH Secure Shell protocol server (sshd)
110 Summary(pl):    Serwer protoko³u Secure Shell (sshd)
111 Requires:       openssh
112 Requires:       chkconfig >= 0.9
113 Group:          Networking/Daemons
114 Group(de):      Netzwerkwesen/Server
115 Group(pl):      Sieciowe/Serwery
116 Obsoletes:      ssh-server
117 Requires:       /bin/login
118 Requires:       util-linux
119 Prereq:         rc-scripts
120 Prereq:         /sbin/chkconfig
121 Prereq:         %{name} = %{version}
122
123 %description server
124 Ssh (Secure Shell) a program for logging into a remote machine and for
125 executing commands in a remote machine. It is intended to replace
126 rlogin and rsh, and provide secure encrypted communications between
127 two untrusted hosts over an insecure network. X11 connections and
128 arbitrary TCP/IP ports can also be forwarded over the secure channel.
129
130 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
131 it up to date in terms of security and features, as well as removing
132 all patented algorithms to seperate libraries (OpenSSL).
133
134 This package contains the secure shell daemon. The sshd is the server
135 part of the secure shell protocol and allows ssh clients to connect to
136 your host.
137
138 %description -l pl server
139 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
140 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
141 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
142 pomiedzy dwoma hostami.
143
144 Ten pakiet zawiera serwer sshd (do którego mog± ³±czyæ siê klienci
145 ssh).
146
147 %package embed
148 Summary:        OpenSSH Secure Shell for embedded applications
149 Summary:        OpenSSH Secure Shell dla aplikacji wbudowanych 
150 Requires:       openssh
151 Group:          Applications/Networking
152 Group(de):      Applikationen/Netzwerkwesen
153 Group(pl):      Aplikacje/Sieciowe
154 Obsoletes:      ssh-clients
155
156 %description embed
157 OpenSSH for embedded enviroment. Client, server, scp and ssh-keygen.
158
159 %description -l pl embed
160 OpenSSH dla aplikacji wbudowanych. Klient, serwer, scp i ssh-keygen.
161
162
163 %package gnome-askpass
164 Summary:        OpenSSH GNOME passphrase dialog
165 Summary(pl):    Odpytywacz has³a OpenSSH dla GNOME
166 Group:          Applications/Networking
167 Group(de):      Applikationen/Netzwerkwesen
168 Group(pl):      Aplikacje/Sieciowe
169 Requires:       %{name} = %{version}
170 Obsoletes:      ssh-extras
171 Obsoletes:      ssh-askpass
172 Obsoletes:      openssh-askpass
173
174 %description gnome-askpass
175 Ssh (Secure Shell) a program for logging into a remote machine and for
176 executing commands in a remote machine. It is intended to replace
177 rlogin and rsh, and provide secure encrypted communications between
178 two untrusted hosts over an insecure network. X11 connections and
179 arbitrary TCP/IP ports can also be forwarded over the secure channel.
180
181 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
182 it up to date in terms of security and features, as well as removing
183 all patented algorithms to seperate libraries (OpenSSL).
184
185 This package contains the GNOME passphrase dialog.
186
187 %description -l pl gnome-askpass
188 Ssh (Secure Shell) to program s³u¿±cy do logowania siê na zdaln±
189 maszynê i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
190 zast±piæ rlogin, rsh i dostarczyæ bezpieczne, szyfrowane po³±czenie
191 pomiedzy dwoma hostami.
192
193 Ten pakiet zawiera ,,odpytywacz has³a'' dla GNOME.
194
195 %prep
196 %setup  -q
197 %patch0 -p1
198 %patch1 -p1
199 %patch2 -p1
200 %patch3 -p1
201
202 %build
203 aclocal
204 autoconf
205
206 %if %{!?_without_embed:1}%{?_without_embed:0}
207 %configure \
208         --without-gnome-askpass \
209         --without-pam \
210         --without-shadow \
211         --with-mantype=man \
212         --with-md5-passwords \
213         --with-ipaddr-display \
214         --with-4in6 \
215         --disable-suid-ssh \
216         --without-tcp-wrappers \
217         --with-pid-dir=%{_localstatedir}/run \
218         CC=%{embed_cc} CFLAGS="%{embed_cflags}"
219
220 echo '#define LOGIN_PROGRAM           "/bin/login"' >>config.h
221 %{__make}
222
223 for f in %{embed_binaries} ; do
224         mv -f $f $f-embed-shared
225 done
226
227 %{__make} LDFLAGS='-static -L. -Lopenbsd-compat/'
228
229 for f in %{embed_binaries} ; do
230         mv -f $f $f-embed-static
231 done
232
233 %{__make} distclean
234 %endif
235
236 %configure \
237         %{!?_without_gnome:--with-gnome-askpass} \
238         --with-pam \
239         --with-mantype=man \
240         --with-md5-passwords \
241         --with-ipaddr-display \
242         --with-4in6 \
243         --disable-suid-ssh \
244         --with-tcp-wrappers \
245         --with-pid-dir=%{_localstatedir}/run
246
247 echo '#define LOGIN_PROGRAM           "/bin/login"' >>config.h
248
249 %{__make}
250
251 %{!?_without_gnome: cd contrib && %{__cc} %{rpmcflags} `gnome-config --cflags gnome gnomeui gtk` } \
252 %{!?_without_gnome:     gnome-ssh-askpass.c -o gnome-ssh-askpass } \
253 %{!?_without_gnome:     `gnome-config --libs gnome gnomeui gtk` }
254
255 %install
256 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{pam.d,rc.d/init.d,sysconfig,security}}
258
259 %{__make} install DESTDIR="$RPM_BUILD_ROOT"
260
261 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/sshd
262 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/passwdssh
263 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/sshd
264 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
265 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ssh_config
266 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sshd_config
267 install -d $RPM_BUILD_ROOT%{_libexecdir}/ssh
268 %{!?_without_gnome:install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass}
269
270 rm -f   $RPM_BUILD_ROOT%{_mandir}/man1/slogin.1
271 echo ".so man1/ssh.1" > $RPM_BUILD_ROOT%{_mandir}/man1/slogin.1
272
273 gzip -9nf *.RNG TODO README OVERVIEW CREDITS Change*
274
275 touch $RPM_BUILD_ROOT/etc/security/blacklist.sshd
276
277 %if %{!?_without_embed:1}%{?_without_embed:0}
278 install -d $RPM_BUILD_ROOT/%{embed_path}/{shared,static}
279 for f in %{embed_binaries} ; do
280         install $f-embed-static $RPM_BUILD_ROOT/%{embed_path}/static/$f
281         install $f-embed-shared $RPM_BUILD_ROOT/%{embed_path}/shared/$f
282 done
283 %endif
284
285 %clean
286 rm -rf $RPM_BUILD_ROOT
287
288 %post server
289 /sbin/chkconfig --add sshd
290 if [ -f /var/lock/subsys/sshd ]; then
291         /etc/rc.d/init.d/sshd restart 1>&2
292 else
293         echo "Run \"/etc/rc.d/init.d/sshd start\" to start openssh daemon."
294 fi
295 if ! grep ssh /etc/security/passwd.conf >/dev/null 2>&1 ; then
296         echo "ssh" >> /etc/security/passwd.conf
297 fi
298
299 %preun server
300 if [ "$1" = "0" ]; then
301         if [ -f /var/lock/subsys/sshd ]; then
302                 /etc/rc.d/init.d/sshd stop 1>&2
303         fi
304         /sbin/chkconfig --del sshd
305 fi
306
307 %files
308 %defattr(644,root,root,755)
309 %doc *.gz
310 %attr(755,root,root) %{_bindir}/ssh-key*
311 %{_mandir}/man1/ssh-key*.1*
312 %dir %{_sysconfdir}
313
314 %files clients
315 %defattr(644,root,root,755)
316 %attr(0755,root,root) %{_bindir}/ssh
317 %attr(0755,root,root) %{_bindir}/slogin
318 %attr(0755,root,root) %{_bindir}/sftp
319 %attr(0755,root,root) %{_bindir}/ssh-agent
320 %attr(0755,root,root) %{_bindir}/ssh-add
321 %attr(755,root,root) %{_bindir}/scp
322 %{_mandir}/man1/scp.1*
323 %{_mandir}/man1/ssh.1*
324 %{_mandir}/man1/slogin.1*
325 %{_mandir}/man1/sftp.1*
326 %{_mandir}/man1/ssh-agent.1*
327 %{_mandir}/man1/ssh-add.1*
328 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ssh_config
329
330 %files server
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_sbindir}/sshd
333 %attr(755,root,root) %{_libexecdir}/sftp-server
334 %dir %{_libexecdir}
335 %{_mandir}/man8/sshd.8*
336 %{_mandir}/man8/sftp-server.8*
337 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sshd_config
338 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/sshd
339 %attr(640,root,root) %{_sysconfdir}/moduli
340 %attr(754,root,root) /etc/rc.d/init.d/sshd
341 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sshd
342 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.sshd
343
344 %{!?_without_gnome:%files gnome-askpass}
345 %{!?_without_gnome:%defattr(644,root,root,755)}
346 %{!?_without_gnome:%dir %{_libexecdir}/ssh}
347 %{!?_without_gnome:%attr(755,root,root) %{_libexecdir}/ssh/ssh-askpass}
348
349 %if %{!?_without_embed:1}%{?_without_embed:0}
350 %files embed
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{embed_path}/*/*
353 %endif
This page took 0.060279 seconds and 3 git commands to generate.