File openssh-askpass.spec of Package openssh-askpass
#
# spec file for package openssh-askpass
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{suse_version} < 1100
%define _xprefix /usr/X11R6
%define _mandir %{_xprefix}/man
%define _appdefdir %{_xprefix}/lib/X11/app-defaults
%else
%define _appdefdir %{_prefix}/share/X11/app-defaults
%endif
Name: openssh-askpass
%if 0%{?suse_version} < 1220
BuildRequires: xorg-x11-devel
%else
BuildRequires: imake
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xt)
%endif
Version: 1.2.4.1
Release: 0
Summary: A passphrase dialog for OpenSSH and the X Window System
License: BSD-3-Clause and MIT
Group: Productivity/Networking/SSH
Url: http://www.jmknoble.net/software/x11-ssh-askpass/
Source0: x11-ssh-askpass-%{version}.tar.bz2
Patch1: x11-ssh-askpass-%{version}.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openssh
Provides: openssh:%{_libexecdir}/ssh/ssh-askpass
Supplements: packageand(openssh:libX11-6)
%description
Ssh (Secure Shell) is a program for logging into a remote machine and
for executing commands on a remote machine. This package contains an X
Window System passphrase dialog for OpenSSH.
%prep
%setup -q -n x11-ssh-askpass-%{version}
%patch1
%build
LDFLAGS="-pie"
CFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector -fPIC"
CXXFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector"
export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
./configure \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--libexecdir=%{_libexecdir}/ssh \
xmkmf
#make includes USRLIBDIR=%{_libdir}
#make %{?_smp_mflags} USRLIBDIR=%{_libdir} CCOPTIONS="%{optflags}"
make includes
make %{?_smp_mflags}
%install
make BINDIR=%{_libexecdir}/ssh DESTDIR=%{buildroot} install install.man
rm -f %{buildroot}%{_libexecdir}/ssh/ssh-askpass
rm -f %{buildroot}%{_mandir}/man1/ssh-askpass.1x
%files
%defattr(-,root,root)
%dir %{_libexecdir}/ssh
%attr(0755,root,root) %{_libexecdir}/ssh/x11-ssh-askpass
%doc %{_mandir}/man1/x11-ssh-askpass.1x.gz
%{_appdefdir}/*
%if 0%{?suse_version} >= 1140
%dir %{_appdefdir}
%endif
%changelog