Skip to content

Commit

Permalink
Merge pull request #186 from kageurufu/archlinux-simpler-pkgbuild
Browse files Browse the repository at this point in the history
Simpler archlinux PKGBUILD - Separate pam-python and use the existing python-dlib and python-face_recognition packages
  • Loading branch information
boltgolt authored Nov 19, 2019
2 parents a051e41 + 37bcc3a commit 68f431e
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 105 deletions.
7 changes: 7 additions & 0 deletions archlinux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pkg
src
*.tar.gz
*.zip
*.tar.xz
*.patch
*.dat.bz2
88 changes: 0 additions & 88 deletions archlinux/PKGBUILD

This file was deleted.

33 changes: 33 additions & 0 deletions archlinux/howdy/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
pkgbase = howdy
pkgdesc = Windows Hello for Linux
pkgver = 2.5.1
pkgrel = 1
url = https://github.com/boltgolt/howdy
arch = x86_64
license = MIT
makedepends = python2-sphinx
makedepends = cmake
makedepends = pkgfile
depends = opencv
depends = hdf5
depends = pam-python
depends = python2
depends = python3
depends = python-pillow
depends = python-dlib
depends = python-face_recognition
depends = python-face_recognition_models
depends = python-click
depends = python-numpy
backup = usr/lib/security/howdy/config.ini
source = https://github.com/boltgolt/howdy/archive/v2.5.1.tar.gz
source = https://github.com/davisking/dlib-models/raw/master/dlib_face_recognition_resnet_model_v1.dat.bz2
source = https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2
source = https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2
sha256sums = 596c8d947422e6d419746784f900a4af931a6fc647e1324913c6ce66a146bf82
sha256sums = abb1f61041e434465855ce81c2bd546e830d28bcbed8d27ffbe5bb408b11553a
sha256sums = db9e9e40f092c118d5eb3e643935b216838170793559515541c56a2b50d9fc84
sha256sums = 6e787bbebf5c9efdb793f6cd1f023230c4413306605f24f299f12869f95aa472

pkgname = howdy

7 changes: 7 additions & 0 deletions archlinux/howdy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pkg
src
*.tar.gz
*.zip
*.tar.xz
*.patch
*.dat.bz2
58 changes: 58 additions & 0 deletions archlinux/howdy/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Maintainer: Frank Tackitt <[email protected]>
# Maintainer: boltgolt <[email protected]>
# Contributor: Kelley McChesney <[email protected]>

pkgname=howdy
pkgver=2.5.1
pkgrel=1
pkgdesc="Windows Hello for Linux"
arch=('x86_64')
url="https://github.com/boltgolt/howdy"
license=('MIT')
depends=(
'opencv'
'hdf5'
'pam-python'
'python3'
'python-pillow'
'python-dlib'
'python-face_recognition'
'python-face_recognition_models'
'python-click'
'python-numpy'
)
makedepends=(
'python2-sphinx'
'cmake'
'pkgfile'
)
backup=('usr/lib/security/howdy/config.ini')
source=(
"https://github.com/boltgolt/howdy/archive/v${pkgver}.tar.gz"
"https://github.com/davisking/dlib-models/raw/master/dlib_face_recognition_resnet_model_v1.dat.bz2"
"https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2"
"https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2"
)
sha256sums=(
'596c8d947422e6d419746784f900a4af931a6fc647e1324913c6ce66a146bf82'
'abb1f61041e434465855ce81c2bd546e830d28bcbed8d27ffbe5bb408b11553a'
'db9e9e40f092c118d5eb3e643935b216838170793559515541c56a2b50d9fc84'
'6e787bbebf5c9efdb793f6cd1f023230c4413306605f24f299f12869f95aa472'
)

package() {
# Installing the proper license files and the rest of howdy
cd howdy-$pkgver
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
mkdir -p "$pkgdir/usr/lib/security/howdy"
cp -r src/* "$pkgdir/usr/lib/security/howdy"
cp "${srcdir}/dlib_face_recognition_resnet_model_v1.dat" "$pkgdir/usr/lib/security/howdy/dlib-data/"
cp "${srcdir}/mmod_human_face_detector.dat" "$pkgdir/usr/lib/security/howdy/dlib-data/"
cp "${srcdir}/shape_predictor_5_face_landmarks.dat" "$pkgdir/usr/lib/security/howdy/dlib-data/"
chmod 600 -R "$pkgdir/usr/lib/security/howdy"
mkdir -p "$pkgdir/usr/bin"
ln -s /lib/security/howdy/cli.py "$pkgdir/usr/bin/howdy"
chmod +x "$pkgdir/usr/lib/security/howdy/cli.py"
mkdir -p "$pkgdir/usr/share/bash-completion/completions"
cp autocomplete/howdy "$pkgdir/usr/share/bash-completion/completions/howdy"
}
21 changes: 4 additions & 17 deletions archlinux/.SRCINFO → archlinux/pam-python/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
pkgbase = howdy
pkgdesc = Windows Hello for Linux
pkgver = 2.5.1
pkgbase = pam-python
pkgdesc = Python for PAM
pkgver = 1.0.6
pkgrel = 1
url = https://github.com/boltgolt/howdy
arch = x86_64
license = MIT
makedepends = python2-sphinx
makedepends = git
makedepends = cmake
makedepends = pkgfile
makedepends = python-pip
depends = opencv
depends = hdf5
depends = python2
depends = python3
depends = python-pillow
depends = python-face_recognition_models
depends = python-click
depends = python-numpy
backup = usr/lib/security/howdy/config.ini
source = https://github.com/boltgolt/howdy/archive/v2.5.1.tar.gz
source = https://downloads.sourceforge.net/project/pam-python/pam-python-1.0.6-1/pam-python-1.0.6.tar.gz
source = https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-fedora.patch
source = https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-gcc8.patch
sha256sums = 596c8d947422e6d419746784f900a4af931a6fc647e1324913c6ce66a146bf82
sha256sums = 0ef4dda35da14088afb1640266415730a6e0274bea934917beb5aca90318f853
sha256sums = acb9d1b5cf7cad73d5524334b7954431bb9b90f960980378c538907e468c34b5
sha256sums = 02dd9a4d8ec921ff9a2408183f290f08102e3f9e0151786ae7220a4d550bfe24

pkgname = howdy
pkgname = pam-python

7 changes: 7 additions & 0 deletions archlinux/pam-python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pkg
src
*.tar.gz
*.zip
*.tar.xz
*.patch
*.dat.bz2
41 changes: 41 additions & 0 deletions archlinux/pam-python/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainer: boltgolt <[email protected]>
# Maintainer: Kelley McChesney <[email protected]>
pkgname=pam-python
pkgver=1.0.7
pkgrel=1
pkgdesc="Python for PAM"
arch=('x86_64')
url="https://github.com/boltgolt/howdy"
license=('MIT')
depends=(
'python2'
)
makedepends=(
'python2-sphinx'
'cmake'
)
source=(
"https://downloads.sourceforge.net/project/pam-python/pam-python-1.0.7-1/pam-python-1.0.7.tar.gz"
)
sha256sums=('96ce72fe355b03b87c0eb540ecef06f33738f98f56581e81eb5bffbad1a47e07')

prepare() {
# Preparing pam-python to be installed
cd "$srcdir/pam-python-$pkgver"
sed -i'' 's|#!/usr/bin/python -W default|#!/usr/bin/python2 -W default|g' src/setup.py
sed -i'' 's|#!/usr/bin/python -W default|#!/usr/bin/python2 -W default|g' src/test.py
sed -i'' 's|LIBDIR ?= /lib/security|LIBDIR ?= /usr/lib/security|g' src/Makefile
sed -i'' 's|sphinx-build|sphinx-build2|g' doc/Makefile
}

build() {
# Building pam-python
cd "$srcdir/pam-python-$pkgver"
PREFIX=/usr make
}

package() {
# Installing pam-python
cd "$srcdir/pam-python-$pkgver"
PREFIX=/usr make DESTDIR="$pkgdir/" install
}

0 comments on commit 68f431e

Please sign in to comment.