]> andersk Git - gssapi-openssh.git/blame - openssh/contrib/caldera/openssh.spec
Import of OpenSSH 3.1p1
[gssapi-openssh.git] / openssh / contrib / caldera / openssh.spec
CommitLineData
3c0ef626 1%define use-stable 1
2%if %{use-stable}
e9a17296 3 %define version 3.1p1
3c0ef626 4 %define cvs %{nil}
5 %define release 1
6%else
7 %define version 3.0p1
8 %define cvs cvs20011102
9 %define release 0r1
10%endif
11%define xsa x11-ssh-askpass
12%define askpass %{xsa}-1.2.4.1
13
14Name : openssh
15Version : %{version}%{cvs}
16Release : %{release}
17Group : System/Network
18
19Summary : OpenSSH free Secure Shell (SSH) implementation.
20
21Copyright : BSD
22Packager : Raymund Will <ray@caldera.de>
23URL : http://www.openssh.com/
24
25Obsoletes : ssh, ssh-clients, openssh-clients
26
27BuildRoot : /tmp/%{Name}-%{Version}
28
29# %{use-stable}==1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
30# %{use-stable}==0: :pserver:cvs@bass.directhit.com:/cvs/openssh_cvs
31Source0: see-above:/.../openssh-%{Version}.tar.gz
32%if %{use-stable}
33Source1: see-above:/.../openssh-%{Version}.tar.gz.sig
34%endif
35Source2: http://www.ntrnet.net/~jmknoble/software/%{xsa}/%{askpass}.tar.gz
36Source3: http://www.openssh.com/faq.html
37
38
39%Package server
40Group : System/Network
41Requires : openssh = %{Version}
42Obsoletes : ssh-server
43
44Summary : OpenSSH Secure Shell protocol server (sshd).
45
46
47%Package askpass
48Group : System/Network
49Requires : openssh = %{Version}
50URL : http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/
51Obsoletes : ssh-extras
52
53Summary : OpenSSH X11 pass-phrase dialog.
54
55
56%Prep
57%setup %([ -z "%{cvs}" ] || echo "-n %{Name}_cvs") -a2
58
59%if ! %{use-stable}
60 autoreconf
61%endif
62
63
64%Build
65CFLAGS="$RPM_OPT_FLAGS" \
66./configure \
67 --prefix=/usr \
68 --sysconfdir=/etc/ssh \
69 --libexecdir=/usr/lib/ssh \
70 --with-pam \
71 --with-tcp-wrappers \
72 --with-ipv4-default \
73
74make
75
76cd %{askpass}
77./configure
78xmkmf
79make includes
80make
81
82
83%Install
84%{mkDESTDIR}
85
86make DESTDIR="$DESTDIR" install
87
88make -C %{askpass} BINDIR="/usr/lib/ssh" install
89
90# OpenLinux specific configuration
91mkdir -p $DESTDIR/{etc/pam.d,%{SVIcdir},%{SVIdir}}
92
93# enabling X11 forwarding on the server is convenient and okay,
94# on the client side we consider it a potential security risk!
95%{fixUP} -vT $DESTDIR/etc/ssh/sshd_config -e '
96 s/X11Forwarding no/X11Forwarding yes/i'
97
98install -m644 contrib/caldera/sshd.pam $DESTDIR/etc/pam.d/sshd
99# FIXME: disabled, find out why this doesn't work with NIS
100%{fixUP} -vT $DESTDIR/etc/pam.d/sshd -e 's/^(.*pam_limits.*)$/#$1/'
101
102install -m 0755 contrib/caldera/sshd.init $DESTDIR%{SVIdir}/sshd
103%{fixUP} -vT $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}: +
104 s:\@sysconfdir\@:/etc/ssh:'
105
106cat <<-EoD > $DESTDIR%{SVIcdir}/sshd
107 IDENT=sshd
108 DESCRIPTIVE="OpenSSH secure shell daemon"
109 # This service will be marked as 'skipped' on boot if there
110 # is no host key. Use ssh-host-keygen to generate one.
111 ONBOOT="yes"
112 OPTIONS=""
113EoD
114
115SKG=$DESTDIR/usr/sbin/ssh-host-keygen
116install -m 0755 contrib/caldera/ssh-host-keygen $SKG
117%{fixUP} -T $SKG -e 's:\@sysconfdir\@:/etc/ssh: +
118 s:\@sshkeygen\@:/usr/bin/ssh-keygen:'
119
120
121# install remaining docs
122DocD="$DESTDIR%{_defaultdocdir}/%{Name}-%{Version}"; mkdir -p $DocD/00-LEGAL
123cp -a LICENCE $DocD/00-LEGAL
124cp -a CREDITS ChangeLog OVERVIEW README* TODO $DocD
125install -p -m 0444 -o 0 -g 0 %{SOURCE3} $DocD/faq.html
126mkdir -p $DocD/%{askpass}
127cp -a %{askpass}/{README,ChangeLog,TODO,SshAskpass*.ad} $DocD/%{askpass}
128
129cp -p %{askpass}/%{xsa}.man $DESTDIR/usr/man/man1/%{xsa}.1
130ln -s %{xsa}.1 $DESTDIR/usr/man/man1/ssh-askpass.1
131
132%{fixManPages}
133
134
135# generate file lists
136%{mkLists} -c %{Name}
137%{mkLists} -d %{Name} << 'EOF'
138/etc/ssh base
139^/etc/ IGNORED
140%{_defaultdocdir}/$ IGNORED
141askpass askpass
142* default
143EOF
144%{mkLists} -a -f %{Name} << 'EOF'
145^/etc * prefix(%%config)
146/usr/X11R6/lib/X11/app-defaults IGNORED
147Ssh.bin IGNORED # for now
148[Aa]skpass askpass
149%{_defaultdocdir}/%{Name}-%{Version}/ base
150ssh-keygen base
151moduli server
152sshd server
153sftp-server server
154.* base
155EOF
156
157
158%Clean
159%{rmDESTDIR}
160
161
162%Post
163# Generate host key when none is present to get up and running,
164# both client and server require this for host-based auth!
165# ssh-host-keygen checks for existing keys.
166/usr/sbin/ssh-host-keygen
167: # to protect the rpm database
168
169
170%Post server
171if [ -x %{LSBinit}-install ]; then
172 %{LSBinit}-install sshd
173else
174 lisa --SysV-init install sshd S55 3:4:5 K45 0:1:2:6
175fi
176
177! %{SVIdir}/sshd status || %{SVIdir}/sshd restart
178: # to protect the rpm database
179
180
181%PreUn server
182[ "$1" = 0 ] || exit 0
183
184! %{SVIdir}/sshd status || %{SVIdir}/sshd stop
185: # to protect the rpm database
186
187
188%PostUn server
189if [ -x %{LSBinit}-remove ]; then
190 %{LSBinit}-remove sshd
191else
192 lisa --SysV-init remove sshd $1
193fi
194: # to protect the rpm database
195
196
197%Files -f files-%{Name}-base
198%defattr(-,root,root)
199
200
201%Files server -f files-%{Name}-server
202%defattr(-,root,root)
203
204
205%Files askpass -f files-%{Name}-askpass
206%defattr(-,root,root)
207
208
209%Description
210OpenSSH (Secure Shell) provides access to a remote system. It replaces
211telnet, rlogin, rexec, and rsh, and provides secure encrypted
212communications between two untrusted hosts over an insecure network.
213X11 connections and arbitrary TCP/IP ports can also be forwarded over
214the secure channel.
215
216%Description server
217This package installs the sshd, the server portion of OpenSSH.
218
219%Description askpass
220This package contains an X11-based pass-phrase dialog used per
221default by ssh-add(1). It is based on %{askpass}
222by Jim Knoble <jmknoble@pobox.com>.
223
224%ChangeLog
225* Mon Jan 01 1998 ...
226
227$Id$
This page took 0.180159 seconds and 5 git commands to generate.