From 7bdf5fae6a9b6d25afce85af2a03e5bd12291e81 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 5 Nov 2012 13:56:30 -0800 Subject: [PATCH] add packaging --- packaging/openssh.spec | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packaging/openssh.spec b/packaging/openssh.spec index 5199f69..c6b06a7 100644 --- a/packaging/openssh.spec +++ b/packaging/openssh.spec @@ -1,11 +1,17 @@ Name: openssh +%define _appdefdir %{_prefix}/share/X11/app-defaults +BuildRequires: autoconf +BuildRequires: openssl-devel +BuildRequires: pam-devel +Requires: /usr/bin/netstat +Requires(pre): pwdutils coreutils Version: 6.0p1 Release: 0 -License: BSD-3-Clause ; MIT %define xversion 1.2.4.1 Summary: Secure Shell Client and Server (Remote Login Program) -Url: http://www.openssh.com/ +License: BSD-3-Clause ; MIT Group: Productivity/Networking/SSH +Url: http://www.openssh.com/ Source: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz Source1: sshd.init Source2: sshd.pamd @@ -14,7 +20,7 @@ Source11: sshd-gen-keys-start Source12: sshd.service Source13: sshd.socket Source14: sshd@.service -Patch0: %{name}-5.9p1-sshd_config.diff +Patch: %{name}-5.9p1-sshd_config.diff Patch2: %{name}-5.9p1-pam-fix2.diff Patch3: %{name}-5.9p1-saveargv-fix.diff Patch4: %{name}-5.9p1-pam-fix3.diff @@ -32,16 +38,10 @@ Patch17: %{name}-5.9p1-homechroot.patch Patch18: %{name}-5.9p1-sshconfig-knownhostschanges.diff Patch19: %{name}-5.9p1-host_ident.diff Patch21: openssh-nocrazyabicheck.patch -%define _appdefdir %{_datadir}/X11/app-defaults -BuildRequires: autoconf -BuildRequires: openssl-devel -BuildRequires: pam-devel -BuildRequires: systemd -Requires: /usr/bin/netstat BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires(pre): pwdutils coreutils +BuildRequires: systemd -%{!?_initddir:%global _initddir %{_initddir}} +%{!?_initddir:%global _initddir %{_initrddir}} %description SSH (Secure Shell) is a program for logging into and executing commands @@ -53,8 +53,8 @@ xorg-x11 (X Window System) connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. %prep -%setup -q -%patch0 +%setup -q +%patch %patch2 %patch3 %patch4 @@ -87,7 +87,7 @@ export LDFLAGS="-pie" --with-privsep-path=/var/lib/empty \ --with-sandbox=rlimit \ --disable-strip \ - --with-xauth=%{_bindir}/xauth \ + --with-xauth=%{_prefix}/bin/xauth \ --target=%{_target_cpu}-tizen-linux # --with-afs=/usr \ make %{?_smp_mflags} @@ -95,14 +95,14 @@ make %{?_smp_mflags} %install make DESTDIR=%{buildroot}/ install install -d -m 755 %{buildroot}%{_sysconfdir}/pam.d -install -d -m 755 %{buildroot}%{_localstatedir}/lib/sshd -install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sshd +install -d -m 755 %{buildroot}/var/lib/sshd +install -m 644 %{S:2} %{buildroot}%{_sysconfdir}/pam.d/sshd install -d -m 755 %{buildroot}%{_initddir} -install -m 755 %{SOURCE1} %{buildroot}%{_initddir}/sshd +install -m 755 %{S:1} %{buildroot}%{_initddir}/sshd # install shell script to automate the process of adding your public key to a remote machine install -m 755 contrib/ssh-copy-id %{buildroot}%{_bindir} install -m 644 contrib/ssh-copy-id.1 %{buildroot}%{_mandir}/man1 -sed -e "s,@LIBEXEC@,%{_libexecdir},g" < %{SOURCE8} > %{buildroot}%{_libexecdir}/ssh/ssh-askpass +sed -e "s,@LIBEXEC@,%{_libexecdir},g" < %{S:8} > %{buildroot}%{_libexecdir}/ssh/ssh-askpass rm -f %{buildroot}%{_datadir}/Ssh.bin sed -i -e s@/usr/libexec@%{_libexecdir}@g %{buildroot}%{_sysconfdir}/ssh/sshd_config install -D -m 0755 %{SOURCE11} %{buildroot}%{_sbindir}/sshd-gen-keys-start @@ -128,7 +128,7 @@ getent passwd sshd >/dev/null || %{_sbindir}/useradd -r -g sshd -d /var/lib/sshd %files %defattr(-,root,root) -%dir %attr(755,root,root) +%dir %attr(755,root,root) /var/lib/sshd %attr(0755,root,root) %dir %{_sysconfdir}/ssh %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config -- 2.7.4