%global __alternatives /usr/sbin/alternatives
%global appdefaultsdir /usr/share/X11/app-defaults
%{!?release_func:%global release_func() %1%{?dist}}
Name: x11-ssh-askpass
Version: 1.2.4.1
Release: %release_func 10
Summary: A passphrase dialog for X and not only for OpenSSH
Group: Applications/System
License: Public Domain
URL: http://www.jmknoble.net/software/x11-ssh-askpass/
Source0: http://www.jmknoble.net/software/x11-ssh-askpass/%name-%version.tar.gz
Source10: x11-ssh-askpass.csh
Source11: x11-ssh-askpass.sh
Patch0: x11-ssh-askpass-1.2.4-random.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Provides: openssh-askpass-x11
Requires(pre): libXt
Requires(postun): libXt
#Requires(post): %__alternatives
#Requires(preun): %__alternatives
BuildRequires: imake libXt-devel
%description
x11-ssh-askpass is a lightweight passphrase dialog for OpenSSH or
other open variants of SSH. In particular, x11-ssh-askpass is useful
with the Unix port of OpenSSH by Damien Miller and others, and Damien
includes it in his RPM packages of OpenSSH.
x11-ssh-askpass uses only the stock X11 libraries (libX11, libXt) for
its user interface. This reduces its dependencies on external libraries
(such as GNOME or Perl/Tk). See the README for further information.
%prep
%setup -q
%patch0 -p1 -b .random
%global makeflags XAPPLOADDIR='%appdefaultsdir'
%build
export LDFLAGS='-Wl,--as-needed'
%configure --libexecdir=%_libexecdir/openssh
xmkmf
make includes %makeflags
make %{?_smp_mflags} %makeflags
%install
rm -rf $RPM_BUILD_ROOT
make install install.man DESTDIR=$RPM_BUILD_ROOT %makeflags
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/profile.d
install -p -m0755 %SOURCE10 %SOURCE11 $RPM_BUILD_ROOT%_sysconfdir/profile.d/
rm -f $RPM_BUILD_ROOT{%_libexecdir/openssh,%_mandir/man1}/ssh-askpass*
%clean
rm -rf $RPM_BUILD_ROOT
## Disable alternatives stuff for now; it requires support from the
## Fedora Core openssh-askpass package
# #post
# %__alternatives --install \
# %_libexecdir/openssh/ssh-askpass ssh-askpass %_libexecdir/openssh/x11-ssh-askpass \
# --slave %_mandir/man1/ssh-askpass ssh-askpass-man %_mandir/man1/x11-ssh-askpass \
# 50
#
# #preun
# test "$1" != 0 || \
# %__alternatives --remove ssh-askpass %_libexecdir/openssh/x11-ssh-askpass
%files
%defattr(-,root,root,-)
%doc ChangeLog README TODO *.ad
%config(noreplace) %_sysconfdir/profile.d/*
%appdefaultsdir/*
%_libexecdir/openssh
%_mandir/*/*
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Nov 09 2009 Adam Jackson <ajax@redhat.com> 1.2.4.1-8
- Requires: libXt for pre and postun, not the file path, since libXt will
always provide it.
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat May 30 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-6
- use lower-cased name for profile files and simplified them
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.4.1-4
- Autorebuild for GCC 4.3
* Sun Feb 4 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-3
- rebuilt with -Wl,--as-needed
* Fri Sep 15 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-2
- rebuilt
* Tue Jul 25 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-1
- initial Fedora Extras package (review #176580)
* Sat May 20 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-0.2
- removed '%%config' from the app-defaultsdir
- do not own the app-defaultsdir anymore
- added some tricks to the -random patch to avoid removal of the
clear-the-passphrase-memset() during optimization
* Sun Mar 26 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-0.1
- fixed path of app-defaults dir
* Wed Dec 21 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.2.4.1-0
- initial build