]> git.pld-linux.org Git - packages/pinentry.git/commitdiff
- use privimive selector instead of (not present or not configurable) /usr/bin/pinent...
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 26 Aug 2008 15:47:44 +0000 (15:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pinentry.spec -> 1.25

pinentry.spec

index 06931f6176ba7c88b056377bf260d413f49b0535..294a757a38a6bc166525c2f627e05d4b8b852ed8 100644 (file)
@@ -1,4 +1,3 @@
-# TODO: make /usr/bin/pinentry symlink to pinentry-* binary selectable in some way
 #
 # Conditional build:
 %bcond_without gtk     # without GTK+ 1.x dialog
@@ -106,6 +105,22 @@ rm -rf $RPM_BUILD_ROOT
 %{__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
 
@@ -118,6 +133,7 @@ rm -rf $RPM_BUILD_ROOT
 %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*
 
This page took 0.046345 seconds and 4 git commands to generate.