|
|
@@ -39,9 +39,10 @@ Release: %{l_branch}.0
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
|
|
|
-Source1: rc.openssh
|
|
|
-Source2: sshd_config
|
|
|
-Source3: ssh_config
|
|
|
+Source1: fakesyslog.tar.gz
|
|
|
+Source2: rc.openssh
|
|
|
+Source3: sshd_config
|
|
|
+Source4: ssh_config
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
@@ -69,49 +70,64 @@ AutoReqProv: no
|
|
|
algorithms to separate libraries (OpenSSL).
|
|
|
|
|
|
%prep
|
|
|
- %setup0 -q
|
|
|
+ %setup0 -q -c -a 0
|
|
|
+ %setup1 -q -T -D -a 1
|
|
|
|
|
|
%build
|
|
|
- # configure source tree
|
|
|
- CC="%{l_cc}" \
|
|
|
- CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
|
|
|
- LDFLAGS="-L%{l_prefix}/lib" \
|
|
|
- LIBS="-lcrypt" \
|
|
|
- ./configure \
|
|
|
- --prefix=%{l_prefix} \
|
|
|
- --sbindir=%{l_prefix}/bin \
|
|
|
- --mandir=%{l_prefix}/man \
|
|
|
- --infodir=%{l_prefix}/info \
|
|
|
- --sysconfdir=%{l_prefix}/etc/openssh \
|
|
|
- --libexecdir=%{l_prefix}/libexec/openssh \
|
|
|
- --localstatedir=%{l_prefix}/var/openssh \
|
|
|
- --with-pid-dir=%{l_prefix}/var/openssh \
|
|
|
- --with-ssl-dir=%{l_prefix} \
|
|
|
+ # build faked syslog(3) library
|
|
|
+ fakesyslogdir="`pwd`/fakesyslog"
|
|
|
+ ( cd fakesyslog
|
|
|
+ CC="%{l_cc}" \
|
|
|
+ CFLAGS="%{l_cflags -O}" \
|
|
|
+ ./configure \
|
|
|
+ --with-logfile=%{l_prefix}/var/openssh/sshd.log
|
|
|
+ %{l_make} %{l_mflags}
|
|
|
+ )
|
|
|
+
|
|
|
+ # build OpenSSH
|
|
|
+ ( cd openssh-%{version}
|
|
|
+ CC="%{l_cc}" \
|
|
|
+ CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
|
|
|
+ LDFLAGS="-L%{l_prefix}/lib -L$fakesyslogdir" \
|
|
|
+ LIBS="-lcrypt -lfakesyslog" \
|
|
|
+ ./configure \
|
|
|
+ --prefix=%{l_prefix} \
|
|
|
+ --sbindir=%{l_prefix}/bin \
|
|
|
+ --mandir=%{l_prefix}/man \
|
|
|
+ --infodir=%{l_prefix}/info \
|
|
|
+ --sysconfdir=%{l_prefix}/etc/openssh \
|
|
|
+ --libexecdir=%{l_prefix}/libexec/openssh \
|
|
|
+ --localstatedir=%{l_prefix}/var/openssh \
|
|
|
+ --with-pid-dir=%{l_prefix}/var/openssh \
|
|
|
+ --with-ssl-dir=%{l_prefix} \
|
|
|
%if "%{with_pcre}" == "yes"
|
|
|
- --with-pcre=%{l_prefix} \
|
|
|
+ --with-pcre=%{l_prefix} \
|
|
|
%endif
|
|
|
%if "%{with_skey}" == "yes"
|
|
|
- --with-skey=%{l_prefix} \
|
|
|
+ --with-skey=%{l_prefix} \
|
|
|
%endif
|
|
|
- --with-zlib=%{l_prefix} \
|
|
|
- --with-ipv4-default \
|
|
|
- --with-md5-passwords \
|
|
|
- --with-pam \
|
|
|
- --without-smartcard \
|
|
|
- --without-kerberos4 \
|
|
|
- --disable-suid-ssh \
|
|
|
- --without-rsh \
|
|
|
- --with-mantype=man \
|
|
|
- --with-default-path=%{l_prefix}/bin:/bin:/usr/bin:/usr/local/bin
|
|
|
-
|
|
|
- # build package
|
|
|
- %{l_make} %{l_mflags -O}
|
|
|
+ --with-zlib=%{l_prefix} \
|
|
|
+ --with-ipv4-default \
|
|
|
+ --with-md5-passwords \
|
|
|
+ --with-pam \
|
|
|
+ --without-smartcard \
|
|
|
+ --without-kerberos4 \
|
|
|
+ --disable-suid-ssh \
|
|
|
+ --without-rsh \
|
|
|
+ --with-mantype=man \
|
|
|
+ --with-default-path=%{l_prefix}/bin:/bin:/usr/bin:/usr/local/bin
|
|
|
+
|
|
|
+ # build package
|
|
|
+ %{l_make} %{l_mflags -O}
|
|
|
+ )
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
# perform standard installation procedure of OpenSSH
|
|
|
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+ ( cd openssh-%{version}
|
|
|
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+ )
|
|
|
|
|
|
# strip down installation tree
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share
|