From 2c28c943536fcfa4e388399aef1176323587bfd8 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Thu, 3 Dec 2020 01:19:15 +0100 Subject: [PATCH] Made howdy-gtk debian package --- debian/control | 2 +- howdy-gtk/debian/changelog | 5 +++++ howdy-gtk/debian/compat | 1 + howdy-gtk/debian/control | 13 ++++++++++++ howdy-gtk/debian/copyright | 21 +++++++++++++++++++ howdy-gtk/debian/howdy-gtk.links | 1 + howdy-gtk/debian/howdy-gtk.lintian-overrides | 2 ++ howdy-gtk/debian/install | 1 + howdy-gtk/debian/rules | 8 +++++++ howdy-gtk/debian/source/format | 1 + howdy-gtk/debian/source/options | 8 +++++++ howdy-gtk/{ => src}/authsticky.py | 4 +++- howdy-gtk/{ => src}/logo.png | Bin src/compare.py | 4 ++-- 14 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 howdy-gtk/debian/changelog create mode 100644 howdy-gtk/debian/compat create mode 100644 howdy-gtk/debian/control create mode 100644 howdy-gtk/debian/copyright create mode 100644 howdy-gtk/debian/howdy-gtk.links create mode 100644 howdy-gtk/debian/howdy-gtk.lintian-overrides create mode 100644 howdy-gtk/debian/install create mode 100755 howdy-gtk/debian/rules create mode 100644 howdy-gtk/debian/source/format create mode 100644 howdy-gtk/debian/source/options rename howdy-gtk/{ => src}/authsticky.py (96%) mode change 100644 => 100755 rename howdy-gtk/{ => src}/logo.png (100%) diff --git a/debian/control b/debian/control index 0d2ae80..76bb599 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Package: howdy Homepage: https://github.com/boltgolt/howdy Architecture: all Depends: ${misc:Depends}, curl|wget, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, libopencv-dev, cmake -Recommends: libatlas-base-dev | libopenblas-dev | liblapack-dev, streamer +Recommends: libatlas-base-dev | libopenblas-dev | liblapack-dev, streamer, howdy-gtk Suggests: nvidia-cuda-dev (>= 7.5) Description: Howdy: Windows Hello style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition diff --git a/howdy-gtk/debian/changelog b/howdy-gtk/debian/changelog new file mode 100644 index 0000000..627952a --- /dev/null +++ b/howdy-gtk/debian/changelog @@ -0,0 +1,5 @@ +howdy-gtk (0.0.1) xenial; urgency=medium + + * Initial testing release with sticky authentication ui + + -- boltgolt Thu, 03 Dec 2020 00:08:49 +0200 diff --git a/howdy-gtk/debian/compat b/howdy-gtk/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/howdy-gtk/debian/compat @@ -0,0 +1 @@ +10 diff --git a/howdy-gtk/debian/control b/howdy-gtk/debian/control new file mode 100644 index 0000000..e74a4fb --- /dev/null +++ b/howdy-gtk/debian/control @@ -0,0 +1,13 @@ +Source: howdy-gtk +Section: misc +Priority: optional +Standards-Version: 3.9.7 +Build-Depends: python, dh-python, devscripts, dh-make, debhelper, fakeroot +Maintainer: boltgolt +Vcs-Git: https://github.com/boltgolt/howdy + +Package: howdy-gtk +Homepage: https://github.com/boltgolt/howdy +Architecture: all +Depends: ${misc:Depends}, curl|wget, python3, python3-pip, python3-dev, python-gtk2, cmake +Description: Optional UI package for Howdy, written in Gtk diff --git a/howdy-gtk/debian/copyright b/howdy-gtk/debian/copyright new file mode 100644 index 0000000..38c6a9a --- /dev/null +++ b/howdy-gtk/debian/copyright @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 boltgolt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/howdy-gtk/debian/howdy-gtk.links b/howdy-gtk/debian/howdy-gtk.links new file mode 100644 index 0000000..07963da --- /dev/null +++ b/howdy-gtk/debian/howdy-gtk.links @@ -0,0 +1 @@ +/usr/lib/howdy-gtk/authsticky.py /usr/bin/howdy-gtk-auth diff --git a/howdy-gtk/debian/howdy-gtk.lintian-overrides b/howdy-gtk/debian/howdy-gtk.lintian-overrides new file mode 100644 index 0000000..250017d --- /dev/null +++ b/howdy-gtk/debian/howdy-gtk.lintian-overrides @@ -0,0 +1,2 @@ +# W: Don't require ugly linebreaks in last 5 chars +howdy: debian-changelog-line-too-long diff --git a/howdy-gtk/debian/install b/howdy-gtk/debian/install new file mode 100644 index 0000000..279038f --- /dev/null +++ b/howdy-gtk/debian/install @@ -0,0 +1 @@ +src/. /usr/lib/howdy-gtk diff --git a/howdy-gtk/debian/rules b/howdy-gtk/debian/rules new file mode 100755 index 0000000..08b0880 --- /dev/null +++ b/howdy-gtk/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +DH_VERBOSE = 1 + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +%: + dh $@ diff --git a/howdy-gtk/debian/source/format b/howdy-gtk/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/howdy-gtk/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/howdy-gtk/debian/source/options b/howdy-gtk/debian/source/options new file mode 100644 index 0000000..1d6e494 --- /dev/null +++ b/howdy-gtk/debian/source/options @@ -0,0 +1,8 @@ +tar-ignore = ".git" +tar-ignore = ".gitignore" +tar-ignore = ".github" +tar-ignore = "README.md" +tar-ignore = ".travis.yml" +tar-ignore = "fedora" +tar-ignore = "opensuse" +tar-ignore = "archlinux" diff --git a/howdy-gtk/authsticky.py b/howdy-gtk/src/authsticky.py old mode 100644 new mode 100755 similarity index 96% rename from howdy-gtk/authsticky.py rename to howdy-gtk/src/authsticky.py index 0e3e040..3f973d2 --- a/howdy-gtk/authsticky.py +++ b/howdy-gtk/src/authsticky.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Shows a floating window when authenticating import cairo import gi @@ -77,7 +79,7 @@ class StickyWindow(gtk.Window): dir = os.path.dirname(os.path.abspath(__file__)) - image_surface = cairo.ImageSurface.create_from_png(dir + "/logo.png") + image_surface = cairo.ImageSurface.create_from_png("/usr/lib/howdy-gtk/logo.png") ratio = float(windowHeight - 20) / float(image_surface.get_height()) ctx.translate(15, 10) diff --git a/howdy-gtk/logo.png b/howdy-gtk/src/logo.png similarity index 100% rename from howdy-gtk/logo.png rename to howdy-gtk/src/logo.png diff --git a/src/compare.py b/src/compare.py index 8427363..46d0ba1 100644 --- a/src/compare.py +++ b/src/compare.py @@ -115,7 +115,7 @@ pose_predictor = None face_encoder = None # Start the auth ui -gtk_proc = subprocess.Popen(["python3", "-u", "../howdy-gtk/authsticky.py"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) +gtk_proc = subprocess.Popen(["howdy-gtk-auth"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) # Write to the stdin to redraw ui send_to_ui("M", "Starting up...") @@ -202,7 +202,7 @@ while True: frames += 1 # Form a string to let the user know we're real busy - ui_subtext = "Scanned " + str(valid_frames) + " frames" + ui_subtext = "Scanned " + str(valid_frames - dark_tries) + " frames" if (dark_tries > 1): ui_subtext += " (skipped " + str(dark_tries) + " dark frames)" # Show it in the ui as subtext