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