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