]> andersk Git - openssh.git/blob - contrib/redhat/openssh.spec
baf8846915ef3b8eabaa12649decd6b1377ae5b6
[openssh.git] / contrib / redhat / openssh.spec
1 # Version of OpenSSH
2 %define oversion 2.9p1
3
4 # Version of ssh-askpass
5 %define aversion 1.2.4
6
7 # Do we want to disable building of x11-askpass? (1=yes 0=no)
8 %define no_x11_askpass 0
9
10 # Do we want to disable building of gnome-askpass? (1=yes 0=no)
11 %define no_gnome_askpass 0
12
13 # Do we want to link against a static libcrypto? (1=yes 0=no)
14 %define static_libcrypto 0
15
16 # Do we want smartcard support (1=yes 0=no)
17 %define scard 0
18
19 # Use Redhat 7.0 pam control file
20 %define redhat7 0
21
22 # Reserve options to override askpass settings with:
23 # rpm -ba|--rebuild --define 'skip_xxx 1'
24 %{?skip_x11_askpass:%define no_x11_askpass 1}
25 %{?skip_gnome_askpass:%define no_gnome_askpass 1}
26
27 # Options for Redhat version:
28 # rpm -ba|--rebuild --define "rh7 1"
29 %{?rh7:%define redhat7 1}
30
31 # Options for static OpenSSL link:
32 # rpm -ba|--rebuild --define "static_openssl 1"
33 %{?static_openssl:%define static_libcrypto 1}
34
35 # Options for Smartcard support: (needs libsectok and openssl-engine)
36 # rpm -ba|--rebuild --define "smartcard 1"
37 %{?smartcard:%define scard 1}
38
39 %define exact_openssl_version   %(rpm -q openssl | cut -d - -f 2)
40
41 Summary: The OpenSSH implementation of SSH.
42 Name: openssh
43 Version: %{oversion}
44 Release: 1
45 Packager: Damien Miller <djm@mindrot.org>
46 URL: http://www.openssh.com/portable.html
47 Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
48 %if ! %{no_x11_askpass}
49 Source1: http://www.pobox.com/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
50 %endif
51 License: BSD
52 Group: Applications/Internet
53 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
54 Obsoletes: ssh
55 BuildPreReq: perl, openssl-devel, tcp_wrappers
56 BuildPreReq: /bin/login, /usr/include/security/pam_appl.h
57 BuildPreReq: rpm >= 3.0.5
58 %if ! %{no_x11_askpass}
59 BuildPreReq: XFree86-devel
60 %endif
61 %if ! %{no_gnome_askpass}
62 BuildPreReq: gnome-libs-devel
63 %endif
64 %if ! %{static_libcrypto}
65 PreReq: openssl >= 0.9.5a
66 PreReq: openssl = %{exact_openssl_version}
67 Requires: openssl >= 0.9.5a
68 %endif
69 Requires: rpm >= 3.0.5
70
71 %package clients
72 Summary: OpenSSH clients.
73 Requires: openssh = %{version}-%{release}
74 Group: Applications/Internet
75 Obsoletes: ssh-clients
76
77 %package server
78 Summary: The OpenSSH server daemon.
79 Group: System Environment/Daemons
80 Obsoletes: ssh-server
81 PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
82 %if %{redhat7}
83 Requires: /etc/pam.d/system-auth
84 %endif
85
86 %package askpass
87 Summary: A passphrase dialog for OpenSSH and X.
88 Group: Applications/Internet
89 Requires: openssh = %{version}-%{release}
90 Obsoletes: ssh-extras
91
92 %package askpass-gnome
93 Summary: A passphrase dialog for OpenSSH, X, and GNOME.
94 Group: Applications/Internet
95 Requires: openssh = %{version}-%{release}
96 Obsoletes: ssh-extras
97
98 %description
99 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. SSH
100 replaces rlogin and rsh, to provide secure encrypted communications
101 between two untrusted hosts over an insecure network. X11 connections
102 and arbitrary TCP/IP ports can also be forwarded over the secure
103 channel. Public key authentication may be used for "passwordless"
104 access to servers.
105
106 This package includes the core files necessary for both the OpenSSH
107 client and server. To make this package useful, you should also
108 install openssh-clients, openssh-server, or both.
109
110 %description clients
111 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
112
113 This package includes the clients necessary to make encrypted
114 connections to SSH protocol servers.  You'll also need to install the
115 openssh package on OpenSSH clients.
116
117 %description server
118 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
119
120 This package contains the secure shell daemon (sshd). The sshd daemon
121 allows SSH clients to securely connect to your SSH server. You also
122 need to have the openssh package installed.
123
124 %description askpass
125 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
126
127 This package contains an X11 passphrase dialog for OpenSSH.
128
129 %description askpass-gnome
130 OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
131
132 This package contains an X11 passphrase dialog for OpenSSH and the
133 GNOME GUI desktop environment.
134
135 %prep
136
137 %if ! %{no_x11_askpass}
138 %setup -q -a 1
139 %else
140 %setup -q
141 %endif
142
143 %build
144
145 %define _sysconfdir /etc/ssh
146
147 EXTRA_OPTS=""
148
149 %if %{scard}
150         EXTRA_OPTS="$EXTRA_OPTS --with-smartcard"
151 %endif
152
153 %configure \
154         --libexecdir=%{_libexecdir}/openssh \
155         --datadir=%{_datadir}/openssh \
156         --with-pam \
157         --with-tcp-wrappers \
158         --with-ipv4-default \
159         --with-rsh=/usr/bin/rsh \
160         --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin \
161         $EXTRA_OPTS
162
163 %if %{static_libcrypto}
164 perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
165 %endif
166
167 make
168
169 %if ! %{no_x11_askpass}
170 pushd x11-ssh-askpass-%{aversion}
171 %configure \
172         --libexecdir=%{_libexecdir}/openssh
173 xmkmf -a
174 make
175 popd
176 %endif
177
178 %if ! %{no_gnome_askpass}
179 pushd contrib
180 gcc -O -g `gnome-config --cflags gnome gnomeui` \
181         gnome-ssh-askpass.c -o gnome-ssh-askpass \
182         `gnome-config --libs gnome gnomeui`
183 popd
184 %endif
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188 %{makeinstall} \
189         libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
190         datadir=$RPM_BUILD_ROOT%{_datadir}/openssh \
191         DESTDIR=/ # Hack to disable key generation
192
193
194 install -d $RPM_BUILD_ROOT/etc/pam.d/
195 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
196 install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
197 %if %{redhat7}
198 install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
199 %else
200 install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
201 %endif
202 install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
203
204 %if ! %{no_x11_askpass}
205 install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/x11-ssh-askpass
206 ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass
207 %endif
208
209 %if ! %{no_gnome_askpass}
210 install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
211 %endif
212
213 perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
214
215 %clean
216 rm -rf $RPM_BUILD_ROOT
217
218 %post server
219 /sbin/chkconfig --add sshd
220 if test -r /var/run/sshd.pid ; then
221         /etc/rc.d/init.d/sshd restart >&2
222 fi
223
224 %preun server
225 if [ "$1" = 0 ] ; then
226         /etc/rc.d/init.d/sshd stop >&2
227         /sbin/chkconfig --del sshd
228 fi
229
230 %files
231 %defattr(-,root,root)
232 %doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* RFC* TODO WARNING*
233 %attr(0755,root,root) %{_bindir}/ssh-keygen
234 %attr(0755,root,root) %{_bindir}/scp
235 %attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
236 %attr(0644,root,root) %{_mandir}/man1/scp.1*
237 %attr(0755,root,root) %dir %{_sysconfdir}
238 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/moduli
239 %attr(0755,root,root) %dir %{_libexecdir}/openssh
240 %if %{scard}
241 %attr(0755,root,root) %dir %{_datadir}/openssh
242 %attr(0644,root,root) %{_datadir}/openssh/Ssh.bin
243 %endif
244
245 %files clients
246 %defattr(-,root,root)
247 %attr(4755,root,root) %{_bindir}/ssh
248 %attr(0755,root,root) %{_bindir}/ssh-agent
249 %attr(0755,root,root) %{_bindir}/ssh-add
250 %attr(0755,root,root) %{_bindir}/ssh-keyscan
251 %attr(0755,root,root) %{_bindir}/sftp
252 %attr(0644,root,root) %{_mandir}/man1/ssh.1*
253 %attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
254 %attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
255 %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
256 %attr(0644,root,root) %{_mandir}/man1/sftp.1*
257 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
258 %attr(-,root,root) %{_bindir}/slogin
259 %attr(-,root,root) %{_mandir}/man1/slogin.1*
260
261 %files server
262 %defattr(-,root,root)
263 %attr(0755,root,root) %{_sbindir}/sshd
264 %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
265 %attr(0644,root,root) %{_mandir}/man8/sshd.8*
266 %attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
267 #%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
268 %attr(0600,root,root) %config %{_sysconfdir}/sshd_config
269 %attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
270 %attr(0755,root,root) %config /etc/rc.d/init.d/sshd
271
272 %if ! %{no_x11_askpass}
273 %files askpass
274 %defattr(-,root,root)
275 %doc x11-ssh-askpass-%{aversion}/README
276 %doc x11-ssh-askpass-%{aversion}/ChangeLog
277 %doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
278 %attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
279 %attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
280 %endif
281
282 %if ! %{no_gnome_askpass}
283 %files askpass-gnome
284 %defattr(-,root,root)
285 %attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
286 %endif
287
288 %changelog
289 * Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
290 - Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the 
291   Redhat 7.0 spec file
292 * Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
293 - Use RPM configure macro
294 * Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
295 - Some surgery to sshd.init (generate keys at runtime)
296 - Cleanup of groups and removal of keygen calls
297 * Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
298 - Make building of X11-askpass and gnome-askpass optional
299 * Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
300 - Glob manpages to catch compressed files
301 * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
302 - Updated for new location
303 - Updated for new gnome-ssh-askpass build
304 * Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
305 - Added Jim Knoble's <jmknoble@pobox.com> askpass
306 * Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
307 - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
308 * Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
309 - Added 'Obsoletes' directives
310 * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
311 - Use make install
312 - Subpackages
313 * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
314 - Added links for slogin
315 - Fixed perms on manpages
316 * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
317 - Renamed init script
318 * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
319 - Back to old binary names
320 * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
321 - Use autoconf
322 - New binary names
323 * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
324 - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
325
This page took 0.560258 seconds and 3 git commands to generate.