From 22891a1a1b5ffc8a6311199141a85fd3aa00df0d Mon Sep 17 00:00:00 2001 From: Franklyn Tackitt Date: Thu, 11 Apr 2019 09:32:51 -0700 Subject: [PATCH] Simpler archlinux PKGBUILD --- archlinux/.gitignore | 7 +++ archlinux/PKGBUILD | 88 ----------------------------- archlinux/howdy/.SRCINFO | 33 +++++++++++ archlinux/howdy/PKGBUILD | 58 +++++++++++++++++++ archlinux/{ => pam-python}/.SRCINFO | 21 ++----- archlinux/pam-python/PKGBUILD | 50 ++++++++++++++++ 6 files changed, 152 insertions(+), 105 deletions(-) create mode 100644 archlinux/.gitignore delete mode 100644 archlinux/PKGBUILD create mode 100644 archlinux/howdy/.SRCINFO create mode 100644 archlinux/howdy/PKGBUILD rename archlinux/{ => pam-python}/.SRCINFO (59%) create mode 100644 archlinux/pam-python/PKGBUILD diff --git a/archlinux/.gitignore b/archlinux/.gitignore new file mode 100644 index 0000000..6748987 --- /dev/null +++ b/archlinux/.gitignore @@ -0,0 +1,7 @@ +pkg +src +*.tar.gz +*.zip +*.tar.xz +*.patch +*.dat.bz2 \ No newline at end of file diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD deleted file mode 100644 index e100771..0000000 --- a/archlinux/PKGBUILD +++ /dev/null @@ -1,88 +0,0 @@ -# Maintainer: boltgolt -# Maintainer: Kelley McChesney -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' - 'python2' - 'python3' - 'python-pillow' - 'python-face_recognition_models' - 'python-click' - 'python-numpy' -) -makedepends=( - 'python2-sphinx' - 'git' - 'cmake' - 'pkgfile' - 'python-pip' -) -backup=('usr/lib/security/howdy/config.ini') -source=("https://github.com/boltgolt/howdy/archive/v2.5.1.tar.gz" - "https://downloads.sourceforge.net/project/pam-python/pam-python-1.0.6-1/pam-python-1.0.6.tar.gz" - "https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-fedora.patch" - "https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-gcc8.patch") -sha256sums=('596c8d947422e6d419746784f900a4af931a6fc647e1324913c6ce66a146bf82' - '0ef4dda35da14088afb1640266415730a6e0274bea934917beb5aca90318f853' - 'acb9d1b5cf7cad73d5524334b7954431bb9b90f960980378c538907e468c34b5' - '02dd9a4d8ec921ff9a2408183f290f08102e3f9e0151786ae7220a4d550bfe24') -prepare() { - # Preparing dlib with GPU here - git clone --depth 1 https://github.com/davisking/dlib.git dlib_clone - - # Preparing pam-python to be installed - cd pam-python-1.0.6 - 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 - patch -p1 < ../pam-python-1.0.6-fedora.patch - patch -p1 < ../pam-python-1.0.6-gcc8.patch - - # Doing some fixes for pam-python so that it can compile - sudo pkgfile -u - sudo pkgfile /usr/include/sys/cdefs.h core/glibc - cd .. -} -build() { - # Building pam-python - cd pam-python-1.0.6 - PREFIX=/usr make - cd .. - - # Building dlib with GPU - cd dlib_clone - python setup.py build -} -package() { - PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps face_recognition - - # Installing dlib with GPU - cd dlib_clone - python3 setup.py install --no DLIB_USE_CUDA --root="$pkgdir/" --optimize=1 --skip-build - cd .. - - # Installing pam-python - cd pam-python-1.0.6 - PREFIX=/usr make DESTDIR="$pkgdir/" install - cd .. - - # 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" - 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" -} diff --git a/archlinux/howdy/.SRCINFO b/archlinux/howdy/.SRCINFO new file mode 100644 index 0000000..2240f13 --- /dev/null +++ b/archlinux/howdy/.SRCINFO @@ -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 + diff --git a/archlinux/howdy/PKGBUILD b/archlinux/howdy/PKGBUILD new file mode 100644 index 0000000..1a5e522 --- /dev/null +++ b/archlinux/howdy/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: boltgolt +# Maintainer: Kelley McChesney + +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' + 'python2' + '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" +} diff --git a/archlinux/.SRCINFO b/archlinux/pam-python/.SRCINFO similarity index 59% rename from archlinux/.SRCINFO rename to archlinux/pam-python/.SRCINFO index 484a94b..f29de0a 100644 --- a/archlinux/.SRCINFO +++ b/archlinux/pam-python/.SRCINFO @@ -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 diff --git a/archlinux/pam-python/PKGBUILD b/archlinux/pam-python/PKGBUILD new file mode 100644 index 0000000..2f3c2d9 --- /dev/null +++ b/archlinux/pam-python/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: boltgolt +# Maintainer: Kelley McChesney +pkgname=pam-python +pkgver=1.0.6 +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.6-1/pam-python-1.0.6.tar.gz" + "https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-fedora.patch" + "https://sourceforge.net/p/pam-python/tickets/_discuss/thread/5dc8cfd5/5839/attachment/pam-python-1.0.6-gcc8.patch" +) +sha256sums=( + '0ef4dda35da14088afb1640266415730a6e0274bea934917beb5aca90318f853' + 'acb9d1b5cf7cad73d5524334b7954431bb9b90f960980378c538907e468c34b5' + '02dd9a4d8ec921ff9a2408183f290f08102e3f9e0151786ae7220a4d550bfe24' +) + +prepare() { + # Preparing pam-python to be installed + cd pam-python-1.0.6 + 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 + patch -p1 < ../pam-python-1.0.6-fedora.patch + patch -p1 < ../pam-python-1.0.6-gcc8.patch + + cd .. +} +build() { + # Building pam-python + cd pam-python-1.0.6 + PREFIX=/usr make + cd .. +} +package() { + # Installing pam-python + cd pam-python-1.0.6 + PREFIX=/usr make DESTDIR="$pkgdir/" install +}