security/pinentry: initial import, closes #2310

Fri, 15 Nov 2019 20:20:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:20:00 +0100
changeset 1212
38fb7d4d0335
parent 1211
4cc6011ced79
child 1213
4db6f80bd483

security/pinentry: initial import, closes #2310

security/pinentry/pinentry.sh file | annotate | diff | comparison | revisions
security/pinentry/pinentry.sha1 file | annotate | diff | comparison | revisions
security/pinentry/pinentry.txt file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pinentry/pinentry.sh	Fri Nov 15 20:20:00 2019 +0100
@@ -0,0 +1,105 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+PKGNAME=pinentry
+PKGVERSION=1.1.0
+PKGREVISION=1
+PKGLICENSE="GPLv20"
+PKGSUMMARY="collection of PIN or passphrase entry dialogs"
+PKGWWW="https://gnupg.org/index.html"
+PKGDOWNLOAD="https://gnupg.org/ftp/gcrypt/$PKGNAME/$PKGNAME-$PKGVERSION.tar.bz2"
+PKGDEPENDS="libassuan"
+PKGOPTIONS="FLTK GTK LIBSECRET NCURSES QT"
+
+: ${CHOST:=$(uname -m)-linux-musl}
+: ${CBUILD:=$(uname -m)-linux-musl}
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${CXX:=clang++}
+: ${CXXFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${LIBS:=}
+: ${FLTK:=no}
+: ${GTK:=yes}
+: ${LIBSECRET:=yes}
+: ${NCURSES:=yes}
+: ${QT:=yes}
+
+if [ "$FLTK" = "yes" ]; then
+	PKGDEPENDS="fltk $PKGDEPENDS"
+	with_fltk="--enable-pinentry-fltk"
+else
+	with_fltk="--disable-pinentry-fltk"
+fi
+
+if [ "$GTK" = "yes" ]; then
+	PKGDEPENDS="gtk $PKGDEPENDS"
+	with_gtk="--enable-pinentry-gnome3"
+else
+	with_gtk="--disable-pinentry-gnome3"
+fi
+
+if [ "$LIBSECRET" = "yes" ]; then
+	PKGDEPENDS="libsecret $PKGDEPENDS"
+	with_libsecret="--enable-libsecret"
+else
+	with_libsecret="--disable-libsecret"
+fi
+
+if [ "$NCURSES" = "yes" ]; then
+	PKGDEPENDS="ncurses $PKGDEPENDS"
+	with_ncurses="--enable-pinentry-curses --enable-fallback-curses"
+else
+	with_ncurses="--disable-pinentry-curses --disable-fallback-curses"
+fi
+
+if [ "$QT" = "yes" ]; then
+	PKGDEPENDS="qtbase $PKGDEPENDS"
+	with_qt="--enable-pinentry-qt5"
+else
+	with_qt="--disable-pinentry-qt5"
+fi
+	
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar -xvf $PKGNAME-$PKGVERSION.tar.bz2
+	cd $PKGNAME-$PKGVERSION
+
+	# --disable-pinentry-gtk2: Gtk 2 is deprecated in Vanilla Linux.
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	CXX="$CXX" \
+	CXXFLAGS="$CXXFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--disable-pinentry-gtk2 \
+		$with_fltk \
+		$with_gtk \
+		$with_libsecret \
+		$with_ncurses \
+		$with_qt
+	make
+	make install DESTDIR=$DESTDIR
+
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pinentry/pinentry.sha1	Fri Nov 15 20:20:00 2019 +0100
@@ -0,0 +1,1 @@
+693bdf9f48dfb3e040d92f50b1bb464e268b9fb0  pinentry-1.1.0.tar.bz2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pinentry/pinentry.txt	Fri Nov 15 20:20:00 2019 +0100
@@ -0,0 +1,7 @@
+Depending on your pinentry build options you may have different frontends
+available. Change /bin/pinentry symlink to your liking:
+
+	/bin/pinentry-curses (if NCURSES option was set)
+	/bin/pinentry-qt     (if QT option was set)
+	/bin/pinentry-fltk   (if FLTK option was set)
+	/bin/pinentry-gnome  (if GTK option was set)

mercurial