aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-09-24 19:57:24 -0400
committerB. Stack <bgstack15@gmail.com>2024-09-24 19:57:24 -0400
commit0f9ad0d0b810def89705d4c7fbbff962b16ba4c4 (patch)
tree3061220ed78cfe4f4c137e5973c451dd307f1bca
parentadd image to readme (diff)
downloadfprintd-tk-master.tar.gz
fprintd-tk-master.tar.bz2
fprintd-tk-master.zip
dpkg build recipe and assetsHEADmaster
-rw-r--r--Makefile61
-rw-r--r--aux/79-fprintd.rules (renamed from aux/80-fprintd.rules)16
-rw-r--r--aux/fprintd-tk.desktop8
-rw-r--r--aux/fprintd_tk.125
-rw-r--r--aux/fprintd_tk.1.txt23
-rw-r--r--debian/README.Debian5
-rw-r--r--debian/changelog5
-rw-r--r--debian/control15
-rw-r--r--debian/copyright42
-rw-r--r--debian/fprintd-tk.install4
-rw-r--r--debian/fprintd-tk.manpages1
-rw-r--r--debian/patches/devuanize.patch57
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules22
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/local-options4
-rw-r--r--debian/source/options4
-rw-r--r--debian/source/patch-header22
-rw-r--r--debian/upstream/metadata16
-rw-r--r--debian/watch2
-rwxr-xr-xfprintd_tk (renamed from fprintd_tk.py)12
-rw-r--r--fprintd_tk_lib.py1
-rw-r--r--images/fingerprint-gui.pngbin0 -> 1555 bytes
23 files changed, 331 insertions, 17 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..33a658d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,61 @@
+# File: minimal Makefile for dependency resolution only
+# Author: bgstack15
+# Startdate: 2018-11-24
+# Dependencies:
+
+APPNAME = fprintd-tk
+APPVERSION = 0.0.1
+SRCDIR = $(CURDIR)
+prefix = /usr
+SYSCONFDIR = $(DESTDIR)/etc
+DEFAULTDIR = $(DESTDIR)/etc/sysconfig # for debian use '$(DESTDIR)/etc/default'
+BINDIR = $(DESTDIR)$(prefix)/bin
+LIBEXECDIR = $(DESTDIR)$(prefix)/libexec
+SBINDIR = $(DESTDIR)$(prefix)/sbin
+SHAREDIR = $(DESTDIR)$(prefix)/share
+DOCDIR = $(SHAREDIR)/doc/$(APPNAME)
+APPDIR = $(SHAREDIR)/$(APPNAME)
+APPSDIR = $(SHAREDIR)/applications
+ICONSDIR = $(SHAREDIR)/icons
+MIMEDIR = $(SHAREDIR)/mime
+MANDIR = $(SHAREDIR)/man
+XDGAUTODIR = $(SYSCONFDIR)/xdg/autostart
+SYSVDIR = $(SYSCONFDIR)/init.d
+SYSDDIR = $(DESTDIR)$(prefix)/lib/systemd/system
+
+# variables for deplist
+DEPTYPE = dep
+SEPARATOR = ,
+
+awkbin :=$(shell which awk)
+chmodbin :=$(shell which chmod)
+cpbin :=$(shell which cp)
+echobin :=$(shell which echo)
+falsebin :=$(shell which false)
+findbin :=$(shell which find)
+grepbin :=$(shell which grep)
+gzipbin :=$(shell which gzip)
+installbin :=$(shell which install)
+rmbin :=$(shell which rm)
+rmdirbin :=$(shell which rmdir)
+sedbin :=$(shell which sed)
+sortbin :=$(shell which sort)
+truebin :=$(shell which true)
+uniqbin :=$(shell which uniq)
+xargsbin :=$(shell which xargs)
+
+.PHONY: clean list deplist deplist_opts
+
+list:
+ @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'
+
+deplist:
+ @# deplist 2020-04-18 input must be comma separated
+ @# DEPTYPE( dep , rec , sug ) for depends, recommends, or suggests
+ @if test -z "${DISTRO}" ; then ${echobin} "Please run \`make deplist\` with DISTRO= one of: `make deplist_opts 2>&1 1>/dev/null | ${xargsbin}`. Aborted." 1>&2 ; exit 1 ; fi
+ @if ! ${echobin} "${DEPTYPE}" | grep -qE "^(dep|rec|sug)$$" ; then ${echobin} "Please run \`make deplist\` with DEPTYPE= one of: dep, rec, sug. Undefined will use \`dep\`. Aborted." 1>&2 ; exit 1; fi
+ @${grepbin} -h --exclude-dir='doc' -riIE "\<${DEPTYPE}-" ${SRCDIR} | ${awkbin} -v "domain=${DISTRO}" -v "deptype=${DEPTYPE}" 'tolower($$2) ~ deptype"-"domain {$$1="";$$2="";print}' | tr ',' '\n' | ${sortbin} | ${uniqbin} | ${sedbin} -r -e 's/^\s*//' -e "s/\s*\$$/${SEPARATOR}/" | ${xargsbin}
+
+deplist_opts:
+ @# deplist_opts 2020-04-18 find all available dependency domains
+ @${grepbin} -h -o -riIE '\<(dep|rec|sug)-[^\ :]+:' ${SRCDIR} | ${sedbin} -r -e 's/(dep|rec|sug)-//;' -e 's/:$$//;' | ${sortbin} | ${uniqbin} 1>&2
diff --git a/aux/80-fprintd.rules b/aux/79-fprintd.rules
index 080334f..5b03f07 100644
--- a/aux/80-fprintd.rules
+++ b/aux/79-fprintd.rules
@@ -2,21 +2,19 @@
.. File: 80-fprintd.rules
*/
polkit.addRule(function(action, subject) {
- if (
- (
- action.id.match("net.reactivated.fprint.device.enroll") ||
- action.id.match("net.reactivated.fprint.device.verify")
- ) && subject.active) {
+ if ((
+ action.id.match("net.reactivated.fprint.device.enroll") ||
+ action.id.match("net.reactivated.fprint.device.verify")
+ ) && subject.active) {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
- if (
- (
- action.id.match("net.reactivated.fprint.device.setusername")
- ) && subject.active && subject.isInGroup("admins")) {
+ if ((
+ action.id.match("net.reactivated.fprint.device.setusername")
+ ) && subject.active && subject.isInGroup("admins")) {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
return polkit.Result.YES;
diff --git a/aux/fprintd-tk.desktop b/aux/fprintd-tk.desktop
new file mode 100644
index 0000000..064094b
--- /dev/null
+++ b/aux/fprintd-tk.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Gui for fprintd
+Comment=Control enrolled fingerprints
+Exec=/usr/bin/fprintd_tk
+Icon=fingerprint-gui
+Terminal=false
+Type=Application
+Categories=Settings;
diff --git a/aux/fprintd_tk.1 b/aux/fprintd_tk.1
new file mode 100644
index 0000000..c080708
--- /dev/null
+++ b/aux/fprintd_tk.1
@@ -0,0 +1,25 @@
+.\" Text automatically generated by txt2man-wrapper, and stored in repository so the build process does not depend on my wrapper script.
+.TH fprintd_tk 1 "September 2024" "fprintd-tk" "General Commands Manual"
+.SH NAME
+\fBfprintd_tk \fP- gui for fprintd
+.SH SYNOPSIS
+.nf
+.fam C
+\fBfprintd_tk\fP
+.fam T
+.fi
+.fam T
+.fi
+.SH OPTIONS
+No options. Configuration is in gui.
+.SH ENVIRONMENT
+None.
+.SH DESCRIPTION
+\fBfprintd_tk\fP has a simple graphical representation of the 10 fingers and makes it easy to enroll fingers, and verify them. Users in group `\fBadmins\fP` can also control other users' enrolled fingerprints.
+This project is not directly related to fprintd at all. This is just a separate wrapper program to make life easier for users of window managers.
+.SH AUTHOR
+<bgstack15@gmail.com>
+.SH COPYRIGHT
+GPL-3.0-only
+.SH SEE ALSO
+`fprintd(1)`
diff --git a/aux/fprintd_tk.1.txt b/aux/fprintd_tk.1.txt
new file mode 100644
index 0000000..a6e84f2
--- /dev/null
+++ b/aux/fprintd_tk.1.txt
@@ -0,0 +1,23 @@
+title fprintd_tk
+section 1
+project fprintd-tk
+volume General Commands Manual
+date September 2024
+=====
+NAME
+ fprintd_tk - gui for fprintd
+SYNOPSIS
+ fprintd_tk
+OPTIONS
+ No options. Configuration is in gui.
+ENVIRONMENT
+ None.
+DESCRIPTION
+ fprintd_tk has a simple graphical representation of the 10 fingers and makes it easy to enroll fingers, and verify them. Users in group `admins` can also control other users' enrolled fingerprints.
+ This project is not directly related to fprintd at all. This is just a separate wrapper program to make life easier for users of window managers.
+AUTHOR
+ <bgstack15@gmail.com>
+COPYRIGHT
+ GPL-3.0-only
+SEE ALSO
+ `fprintd(1)`
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..7a82510
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,5 @@
+fprintd-tk for Devuan
+
+Initial release.
+
+ -- B. Stack <bgstack15@gmail.com> Tue, 24 Sep 2024 17:20:45 -0400
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..ece8e4c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+fprintd-tk (0.0.1-1) obs; urgency=low
+
+ * Initial release. Closes: packages-want#34
+
+ -- B. Stack <bgstack15@gmail.com> Tue, 24 Sep 2024 17:20:45 -0400
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..58a67ab
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: fprintd-tk
+Section: misc
+Priority: optional
+Maintainer: B. Stack <bgstack15@gmail.com>
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.6.1
+Homepage: https://bgstack15.ddns.net/cgit/fprintd-tk
+Rules-Requires-Root: no
+
+Package: fprintd-tk
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Description: gui for fprintd
+ A gui for managing enrolled fingerprints
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7d6e10d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,42 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: fprintd-tk
+Upstream-Contact: B. Stack <bgstack15@gmail.com>
+Source: <https://bgstack15.ddns.net/cgit/fprintd-tk>
+#
+# Please double check copyright with the licensecheck(1) command.
+
+Files: .gitignore
+ .images/screenshot-fprintd-tk-window.png
+ README.md
+ Makefile
+ aux/*
+ fprintd_tk
+ fprintd_tk_lib.py
+ debian/*
+ images/*
+Copyright: 2024 <bgstack15@gmail.com>
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
+
+#----------------------------------------------------------------------------
+# xml and html files (skipped):
+# images/fingerprint-enrolled.svg
+# images/fingerprint-gui.svg
+
+#----------------------------------------------------------------------------
+# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
+# license/copyright files.
diff --git a/debian/fprintd-tk.install b/debian/fprintd-tk.install
new file mode 100644
index 0000000..0e7147b
--- /dev/null
+++ b/debian/fprintd-tk.install
@@ -0,0 +1,4 @@
+fprintd_tk_lib.py /usr/libexec/fprintd-tk
+images/*.svg /usr/share/fprintd-tk
+aux/fprintd-tk.desktop /usr/share/applications
+images/fingerprint-gui.png /usr/share/icons/hicolor/48x48/apps
diff --git a/debian/fprintd-tk.manpages b/debian/fprintd-tk.manpages
new file mode 100644
index 0000000..25ab9c6
--- /dev/null
+++ b/debian/fprintd-tk.manpages
@@ -0,0 +1 @@
+aux/fprintd_tk.1
diff --git a/debian/patches/devuanize.patch b/debian/patches/devuanize.patch
new file mode 100644
index 0000000..e38a57e
--- /dev/null
+++ b/debian/patches/devuanize.patch
@@ -0,0 +1,57 @@
+Message: set path for library
+Version: 0.0.1
+--- a/aux/fprintd_tk.1
++++ b/aux/fprintd_tk.1
+@@ -1,11 +1,11 @@
+ .\" Text automatically generated by txt2man-wrapper, and stored in repository so the build process does not depend on my wrapper script.
+-.TH fprintd_tk 1 "September 2024" "fprintd-tk" "General Commands Manual"
++.TH fprintd-tk 1 "September 2024" "fprintd-tk" "General Commands Manual"
+ .SH NAME
+-\fBfprintd_tk \fP- gui for fprintd
++\fBfprintd-tk \fP- gui for fprintd
+ .SH SYNOPSIS
+ .nf
+ .fam C
+-\fBfprintd_tk\fP
++\fBfprintd-tk\fP
+ .fam T
+ .fi
+ .fam T
+@@ -15,7 +15,7 @@ No options. Configuration is in gui.
+ .SH ENVIRONMENT
+ None.
+ .SH DESCRIPTION
+-\fBfprintd_tk\fP has a simple graphical representation of the 10 fingers and makes it easy to enroll fingers, and verify them. Users in group `\fBadmins\fP` can also control other users' enrolled fingerprints.
++\fBfprintd-tk\fP has a simple graphical representation of the 10 fingers and makes it easy to enroll fingers, and verify them. Users in group `\fBadmins\fP` can also control other users' enrolled fingerprints.
+ This project is not directly related to fprintd at all. This is just a separate wrapper program to make life easier for users of window managers.
+ .SH AUTHOR
+ <bgstack15@gmail.com>
+--- a/fprintd_tk
++++ b/fprintd_tk
+@@ -21,6 +21,7 @@
+
+ import tkinter as tk, os, tkinter.simpledialog, sys, threading, time
+ import tkstackrpms as stk
++sys.path.append("/usr/libexec/fprintd-tk")
+ import fprintd_tk_lib as lib
+ from PIL import Image, ImageTk
+
+@@ -48,6 +49,7 @@ class App(tk.Frame):
+
+ # configurable by admin or installation
+ img_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"images")
++ img_path = "/usr/share/fprintd-tk"
+
+ self.master.title("Gui for fprintd")
+ imgicon = stk.get_scaled_icon("fingerprint-gui",24,"default", "","apps")
+--- a/aux/fprintd-tk.desktop
++++ b/aux/fprintd-tk.desktop
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Name=Gui for fprintd
+ Comment=Control enrolled fingerprints
+-Exec=/usr/bin/fprintd_tk
++Exec=/usr/bin/fprintd-tk
+ Icon=fingerprint-gui
+ Terminal=false
+ Type=Application
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e52bee1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+devuanize.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..c50b392
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+# You must remove unused comment lines for the released package.
+#export DH_VERBOSE = 1
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
+
+export APPNAME=fprintd-tk
+
+%:
+ dh $@
+
+override_dh_gencontrol:
+ printf "misc:Depends=" > debian/${APPNAME}.substvars
+ make deplist DISTRO=devuan DEPTYPE=dep SEPARATOR=',' | grep -vE 'make\[[0-9]' >> debian/${APPNAME}.substvars
+ dh_gencontrol
+
+execute_after_dh_auto_install:
+ install -m0755 -D fprintd_tk debian/${APPNAME}/usr/bin/fprintd-tk
+
+execute_after_dh_installman:
+ mv -f debian/${APPNAME}/usr/share/man/man1/fprintd_tk.1 debian/${APPNAME}/usr/share/man/man1/fprintd-tk.1
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..77effbe
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1,4 @@
+#
+# ### gbp-buildpackage(1) user may like this. ###
+#abort-on-upstream-changes
+#unapply-patches
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..077de7d
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,4 @@
+#
+# ### dgit-maint-merge(7) workflow user need this ###
+# single-debian-patch
+# auto-commit
diff --git a/debian/source/patch-header b/debian/source/patch-header
new file mode 100644
index 0000000..6ff0a40
--- /dev/null
+++ b/debian/source/patch-header
@@ -0,0 +1,22 @@
+The automatically generated patch puts this free form text on top of it.
+
+If you are using gbp-buildpackage(1), you probably don't need this file.
+
+If you are using dgit-maint-merge(7), please consider text as follows.
+
+The Debian packaging of foo is maintained in git, using the merging workflow
+described in dgit-maint-merge(7). There isn't a patch queue that can be
+represented as a quilt series.
+
+A detailed breakdown of the changes is available from their canonical
+representation - git commits in the packaging repository. For example, to see
+the changes made by the Debian maintainer in the first upload of upstream
+version 1.2.3, you could use:
+
+ % git clone https://git.dgit.debian.org/foo
+ % cd foo
+ % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'
+
+(If you have dgit, use `dgit clone foo`, rather than plain `git clone`.)
+
+A single combined diff, containing all the changes, follows.
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..dc2feb0
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,16 @@
+#
+# DEP-12: Per-package machine-readable metadata about Upstream
+# Please check * https://dep-team.pages.debian.net/deps/dep12/
+# * https://wiki.debian.org/UpstreamMetadata
+Reference:
+ Author: <please use full names and separate multiple author by the keyword "and">
+ Title:
+ Journal:
+ Year:
+ Volume:
+ Number:
+ Pages:
+ DOI:
+ PMID:
+ URL:
+ eprint:
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..76575dc
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+version=3
diff --git a/fprintd_tk.py b/fprintd_tk
index f7442d8..0f4f947 100755
--- a/fprintd_tk.py
+++ b/fprintd_tk
@@ -14,7 +14,7 @@
# stackrpms_tk.py
# Improve:
# Dependencies:
-# dep-devuan: python3-tkstackrpms, python3-tk, python3-pil
+# dep-devuan: python3:any, python3-tkstackrpms, python3-tk, python3-pil
# fprintd_tk_lib.py
# Documentation:
# README.md
@@ -31,16 +31,9 @@ SPDX-License-Identifier: GPL-3.0-only
Icons adapted from Numix-Icon-Theme-Circle (GPL 3)
"""
-# configurable by admin or installation
-img_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"images")
-
# These will be used a lot in the program.
str_hands = ["left","right"]
str_fingers = ["thumb","index-finger","middle-finger","ring-finger","little-finger"]
-str_all = []
-for h in str_hands:
- for f in str_fingers:
- str_all.append(f"{h}-{f}")
class App(tk.Frame):
def __init__(self, master):
@@ -53,6 +46,9 @@ class App(tk.Frame):
self.username = tk.StringVar(value=self.current_username)
self.verbose = tk.BooleanVar(value=False)
+ # configurable by admin or installation
+ img_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"images")
+
self.master.title("Gui for fprintd")
imgicon = stk.get_scaled_icon("fingerprint-gui",24,"default", "","apps")
self.master.tk.call("wm","iconphoto",self.master._w,imgicon)
diff --git a/fprintd_tk_lib.py b/fprintd_tk_lib.py
index 18470cb..71820c2 100644
--- a/fprintd_tk_lib.py
+++ b/fprintd_tk_lib.py
@@ -12,6 +12,7 @@
# Reference:
# Improve:
# Dependencies:
+# dep-devuan: fprintd
# /usr/bin/fprintd-*
# Documentation:
# README.md
diff --git a/images/fingerprint-gui.png b/images/fingerprint-gui.png
new file mode 100644
index 0000000..aaab9e6
--- /dev/null
+++ b/images/fingerprint-gui.png
Binary files differ
bgstack15