SPECS: pinentry.spec - use privimive selector instead of (not present or no...

qboosh qboosh at pld-linux.org
Tue Aug 26 17:47:50 CEST 2008


Author: qboosh                       Date: Tue Aug 26 15:47:50 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use privimive selector instead of (not present or not configurable) /usr/bin/pinentry symlink

---- Files affected:
SPECS:
   pinentry.spec (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SPECS/pinentry.spec
diff -u SPECS/pinentry.spec:1.24 SPECS/pinentry.spec:1.25
--- SPECS/pinentry.spec:1.24	Mon May 12 21:37:44 2008
+++ SPECS/pinentry.spec	Tue Aug 26 17:47:44 2008
@@ -1,5 +1,4 @@
 # $Revision$, $Date$
-# TODO: make /usr/bin/pinentry symlink to pinentry-* binary selectable in some way
 #
 # Conditional build:
 %bcond_without	gtk	# without GTK+ 1.x dialog
@@ -107,6 +106,22 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+rm -f $RPM_BUILD_ROOT%{_bindir}/pinentry
+cat >$RPM_BUILD_ROOT%{_bindir}/pinentry <<'EOF'
+#!/bin/sh
+
+if [ -z "$DISPLAY" ]; then
+	exec %{_bindir}/pinentry-curses "$@"
+elif [ -x %{_bindir}/pinentry-gtk-2 ]; then
+	exec %{_bindir}/pinentry-gtk-2 "$@"
+elif [ -x %{_bindir}/pinentry-gtk ]; then
+	exec %{_bindir}/pinentry-gtk "$@"
+elif [ -x %{_bindir}/pinentry-qt ]; then
+	exec %{_bindir}/pinentry-qt "$@"
+else
+	exec %{_bindir}/pinentry-curses "$@"
+EOF
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -119,6 +134,7 @@
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README THANKS TODO
+%attr(755,root,root) %{_bindir}/pinentry
 %attr(755,root,root) %{_bindir}/pinentry-curses
 %{_infodir}/pinentry.info*
 
@@ -146,7 +162,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
-Revision 1.24  2008/05/12 19:37:44  qboosh
+Revision 1.25  2008/08/26 15:47:44  qboosh
+- use privimive selector instead of (not present or not configurable) /usr/bin/pinentry symlink
+
+Revision 1.24  2008-05-12 19:37:44  qboosh
 - updated to 0.7.5
 - added types patch
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pinentry.spec?r1=1.24&r2=1.25&f=u



More information about the pld-cvs-commit mailing list