diff options
author | David P <megver83@openmailbox.org> | 2017-03-27 10:07:22 -0300 |
---|---|---|
committer | David P <megver83@openmailbox.org> | 2017-03-27 10:07:22 -0300 |
commit | a284aeb36f9b07c11b3fbdfaa70cf654a98d2cb9 (patch) | |
tree | e0652b20ae0ceed62d0a56f4e69027a946ba0763 /pcr/mugshot | |
parent | 3ca4240e209da61acc31f5c4467b0bba283a5c6b (diff) | |
download | abslibre-a284aeb36f9b07c11b3fbdfaa70cf654a98d2cb9.tar.gz abslibre-a284aeb36f9b07c11b3fbdfaa70cf654a98d2cb9.tar.bz2 abslibre-a284aeb36f9b07c11b3fbdfaa70cf654a98d2cb9.zip |
Added mugshot
Diffstat (limited to 'pcr/mugshot')
-rw-r--r-- | pcr/mugshot/PKGBUILD | 38 | ||||
-rw-r--r-- | pcr/mugshot/missing_default_face.patch | 28 | ||||
-rw-r--r-- | pcr/mugshot/office-phone.patch | 35 |
3 files changed, 101 insertions, 0 deletions
diff --git a/pcr/mugshot/PKGBUILD b/pcr/mugshot/PKGBUILD new file mode 100644 index 000000000..e5053e82f --- /dev/null +++ b/pcr/mugshot/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: David P. <megver83@openmailbox.org> +# Contributor: twa022 <twa022 at gmail dot com> +# Contributor: Somasis <somasis@cryptolab.net> + +pkgname=mugshot +pkgver=0.3.2 +pkgrel=3 +pkgdesc="Program to update personal user details" +arch=('any') +url="https://launchpad.net/mugshot" +license=('GPL3') +depends=( 'python-pexpect' 'python-dbus' 'python-cairo' 'python-gobject' ) +makedepends=( 'python-distutils-extra' ) +optdepends=( 'cheese: webcam support' + 'pidgin: update buddy icon' + 'libreoffice: update user details' + 'accountsservice: user image management without ~/.face' +) +options=(!emptydirs) +sha256sums=('ee3debca912c6ddbba613531ab0856496dd247a1f084740ba48cbf42b364c7f0' + '0cf536fa2ff25327f100d3fd13009cf56aab72cfd56dceda87579974722a212d' + '787848e6ba8eae35d9d6f15918b16ce6227de632106480c36725e348e715326a') + +source=("https://launchpad.net/mugshot/${pkgver%.*}/$pkgver/+download/mugshot-${pkgver}.tar.gz" + "office-phone.patch" + "missing_default_face.patch") + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 -i "${srcdir}"/office-phone.patch + cd "${srcdir}" + patch -Np1 -i "${srcdir}"/missing_default_face.patch +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + python3 setup.py install --root "${pkgdir}" +} diff --git a/pcr/mugshot/missing_default_face.patch b/pcr/mugshot/missing_default_face.patch new file mode 100644 index 000000000..4502e84f0 --- /dev/null +++ b/pcr/mugshot/missing_default_face.patch @@ -0,0 +1,28 @@ +diff -Naur ./mugshot-0.3.2.old/mugshot/MugshotWindow.py ./mugshot-0.3.2/mugshot/MugshotWindow.py +--- ./mugshot-0.3.2.old/mugshot/MugshotWindow.py 2016-11-06 09:13:47.604768017 -0500 ++++ ./mugshot-0.3.2/mugshot/MugshotWindow.py 2016-11-06 09:14:11.431116827 -0500 +@@ -257,10 +257,11 @@ + logger.debug('Found profile image: %s' % str(image)) + + if os.path.isfile(face): +- if os.path.samefile(image, face): +- self.updated_image = face +- else: +- self.updated_image = None ++ if os.path.exists(image): ++ if os.path.samefile(image, face): ++ self.updated_image = face ++ else: ++ self.updated_image = None + self.set_user_image(face) + elif os.path.isfile(image): + self.updated_image = image +@@ -612,7 +613,7 @@ + success = False + + logger.debug('Updating Office Phone...') +- ++ + command = "%s -w \"%s\" %s" % (chfn, office_phone, username) + # Office phone is potentially handled by the -o flag in newer versions of chfn + command2 = "%s -o \"%s\" %s" % (chfn, office_phone, username) diff --git a/pcr/mugshot/office-phone.patch b/pcr/mugshot/office-phone.patch new file mode 100644 index 000000000..dbca2c59d --- /dev/null +++ b/pcr/mugshot/office-phone.patch @@ -0,0 +1,35 @@ +From 8f639e7a29b3bfebbbbd8f520c05637377560bb3 Mon Sep 17 00:00:00 2001 +From: Mike Keen <mkeen.atl@gmail.com> +Date: Thu, 5 Nov 2015 11:47:30 -0500 +Subject: [PATCH] Support the -o flag if the -w flag fails + +--- +mugshot/MugshotWindow.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/mugshot/MugshotWindow.py b/mugshot/MugshotWindow.py +index 35323be..b557edf 100644 +--- a/mugshot/MugshotWindow.py ++++ b/mugshot/MugshotWindow.py +@@ -632,11 +632,18 @@ class MugshotWindow(Window): + success = False + + logger.debug('Updating Office Phone...') ++ + command = "%s -w \"%s\" %s" % (chfn, office_phone, username) ++ # Office phone is potentially handled by the -o flag in newer versions of chfn ++ command2 = "%s -o \"%s\" %s" % (chfn, office_phone, username) + if self.process_terminal_password(command, password): + self.office_phone = office_phone + else: +- success = False ++ # Retry with command2 ++ if self.process_terminal_password(command2, password): ++ self.office_phone = office_phone ++ else: ++ success = False + + return (success, response) + +-- +2.6.2 |