]>
Commit | Line | Data |
---|---|---|
6fe24471 AF |
1 | Summary: OpenSSH free Secure Shell (SSH) implementation |
2 | Name: openssh | |
3 | Version: 1.2pre5 | |
4 | Release: 1 | |
5 | Packager: Damien Miller <djm@ibs.com.au> | |
6 | Source0: openssh-%{version}-linux.tar.gz | |
7 | Copyright: BSD | |
8 | Group: Applications/Internet | |
9 | BuildRoot: /tmp/openssh-%{version}-buildroot | |
10 | ||
11 | %description | |
12 | Ssh (Secure Shell) a program for logging into a remote machine and for | |
13 | executing commands in a remote machine. It is intended to replace | |
14 | rlogin and rsh, and provide secure encrypted communications between | |
15 | two untrusted hosts over an insecure network. X11 connections and | |
16 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | |
17 | ||
18 | OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it | |
19 | up to date in terms of security and features, as well as removing all | |
20 | patented algorithms to seperate libraries (OpenSSL). | |
21 | ||
22 | ||
23 | %prep | |
24 | ||
25 | %setup -n openssh | |
26 | ||
27 | %build | |
28 | ||
29 | ./configure --prefix=/usr --sysconfdir=/etc/openssh | |
30 | make OPT_FLAGS="$RPM_OPT_FLAGS" | |
31 | ||
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
34 | mkdir -p $RPM_BUILD_ROOT/usr/bin | |
35 | mkdir -p $RPM_BUILD_ROOT/usr/sbin | |
36 | mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d | |
37 | mkdir -p $RPM_BUILD_ROOT/etc/pam.d | |
38 | mkdir -p $RPM_BUILD_ROOT/etc/openssh | |
39 | mkdir -p $RPM_BUILD_ROOT/usr/man/man1 | |
40 | mkdir -p $RPM_BUILD_ROOT/usr/man/man8 | |
41 | ||
42 | install -m644 opensshd.pam $RPM_BUILD_ROOT/etc/pam.d/opensshd | |
43 | install -m755 opensshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/opensshd | |
44 | install -m600 ssh_config $RPM_BUILD_ROOT/etc/openssh/ssh_config | |
45 | install -m600 sshd_config $RPM_BUILD_ROOT/etc/openssh/sshd_config | |
46 | ||
47 | install -s -m755 bin/opensshd $RPM_BUILD_ROOT/usr/sbin | |
48 | install -s -m755 bin/openssh $RPM_BUILD_ROOT/usr/bin | |
49 | install -s -m755 bin/openscp $RPM_BUILD_ROOT/usr/bin | |
50 | install -s -m755 bin/openssh-agent $RPM_BUILD_ROOT/usr/bin | |
51 | install -s -m755 bin/openssh-add $RPM_BUILD_ROOT/usr/bin | |
52 | install -s -m755 bin/openssh-keygen $RPM_BUILD_ROOT/usr/bin | |
53 | ||
54 | install -m644 opensshd.8 $RPM_BUILD_ROOT/usr/man/man8 | |
55 | install -m644 openssh.1 $RPM_BUILD_ROOT/usr/man/man1 | |
56 | install -m644 openscp.1 $RPM_BUILD_ROOT/usr/man/man1 | |
57 | install -m644 openssh-agent.1 $RPM_BUILD_ROOT/usr/man/man1 | |
58 | install -m644 openssh-add.1 $RPM_BUILD_ROOT/usr/man/man1 | |
59 | install -m644 openssh-keygen.1 $RPM_BUILD_ROOT/usr/man/man1 | |
60 | ||
61 | # Install compatibility symlinks | |
62 | cd $RPM_BUILD_ROOT/usr/sbin | |
63 | ln -s opensshd sshd | |
64 | cd $RPM_BUILD_ROOT/usr/bin | |
65 | ln -s openssh ssh | |
66 | ln -s openscp scp | |
67 | ln -s openssh-agent ssh-agent | |
68 | ln -s openssh-add ssh-add | |
69 | ln -s openssh-keygen ssh-keygen | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %post | |
75 | /sbin/chkconfig --add opensshd | |
76 | if [ ! -f /etc/openssh/ssh_host_key -o ! -s /etc/openssh/ssh_host_key ]; then | |
77 | /usr/bin/openssh-keygen -b 1024 -f /etc/openssh/ssh_host_key -N '' >&2 | |
78 | fi | |
79 | if test -r /var/run/opensshd.pid | |
80 | then | |
81 | /etc/rc.d/init.d/opensshd restart >&2 | |
82 | fi | |
83 | ||
84 | %preun | |
85 | if [ "$1" = 0 ] | |
86 | then | |
87 | /etc/rc.d/init.d/opensshd stop >&2 | |
88 | /sbin/chkconfig --del opensshd | |
89 | fi | |
90 | ||
91 | %files | |
92 | %defattr(-,root,root) | |
93 | %doc COPYING.Ylonen ChangeLog ChangeLog.Ylonen OVERVIEW | |
94 | %doc README README.openssh | |
95 | %attr(0755,root,root) /usr/sbin/opensshd | |
96 | %attr(0755,root,root) /usr/bin/openssh | |
97 | %attr(0755,root,root) /usr/bin/openssh-agent | |
98 | %attr(0755,root,root) /usr/bin/openssh-keygen | |
99 | %attr(0755,root,root) /usr/bin/openssh-add | |
100 | %attr(0755,root,root) /usr/bin/openscp | |
101 | ||
102 | # Symlinks | |
103 | %attr(0755,root,root) /usr/sbin/sshd | |
104 | %attr(0755,root,root) /usr/bin/ssh | |
105 | %attr(0755,root,root) /usr/bin/ssh-agent | |
106 | %attr(0755,root,root) /usr/bin/ssh-keygen | |
107 | %attr(0755,root,root) /usr/bin/ssh-add | |
108 | %attr(0755,root,root) /usr/bin/scp | |
109 | ||
110 | %attr(0755,root,root) /usr/man/man8/opensshd.8 | |
111 | %attr(0755,root,root) /usr/man/man1/openssh.1 | |
112 | %attr(0755,root,root) /usr/man/man1/openssh-agent.1 | |
113 | %attr(0755,root,root) /usr/man/man1/openssh-keygen.1 | |
114 | %attr(0755,root,root) /usr/man/man1/openssh-add.1 | |
115 | %attr(0755,root,root) /usr/man/man1/openscp.1 | |
116 | ||
117 | %attr(0600,root,root) %config /etc/openssh/sshd_config | |
118 | %attr(0600,root,root) %config /etc/pam.d/opensshd | |
119 | %attr(0755,root,root) %config /etc/rc.d/init.d/opensshd | |
120 | %attr(0644,root,root) %config /etc/openssh/ssh_config |