summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgenstern2020-04-08 12:48:16 +1200
committerMorgenstern2020-04-08 12:48:16 +1200
commitf726de810f224f86e7feb439f6a4b14c04cc4a6f (patch)
tree40147de182fce1640df00b08be387576977c8b1d
downloadaur-f726de810f224f86e7feb439f6a4b14c04cc4a6f.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD34
-rw-r--r--roundcubemail-plugin-twofactor-git.install11
3 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e9b841d9707
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = roundcubemail-plugin-twofactor-git
+ pkgdesc = Adds two-step verification (TOTP) to the Roundcube login process
+ pkgver = r191.261d14e
+ pkgrel = 1
+ url = https://github.com/alexandregz/twofactor_gauthenticator
+ install = roundcubemail-plugin-twofactor-git.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = roundcubemail>=0.9.5
+ replaces = roundcube-twofactor-git
+ source = roundcubemail-plugin-twofactor-git::git+https://github.com/alexandregz/twofactor_gauthenticator.git
+ sha512sums = SKIP
+
+pkgname = roundcubemail-plugin-twofactor-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b8457e29454
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Morgenstern <charles [at] charlesbwise [dot] com>
+# Contributor: Philip Abernethy<chais.z3r0@gmail.com>
+
+pkgname=roundcubemail-plugin-twofactor-git
+pkgver=r191.261d14e
+pkgrel=1
+pkgdesc="Adds two-step verification (TOTP) to the Roundcube login process"
+url="https://github.com/alexandregz/twofactor_gauthenticator"
+arch=('any')
+license=('MIT')
+depends=('roundcubemail>=0.9.5')
+makedepends=('git')
+replaces=('roundcube-twofactor-git')
+install=${pkgname}.install
+source=("${pkgname}::git+https://github.com/alexandregz/twofactor_gauthenticator.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ _instdir="${pkgdir}"/usr/share/webapps/roundcubemail/plugins/twofactor_gauthenticator
+ install -dm755 "${_instdir}"/{localization,PHPGangsta}
+ cd "${srcdir}"/${pkgname}
+ find . -type f -name '*php*' -exec install -m644 {} "${_instdir}"/{} \;
+ find . -type f -name '*js*' -exec install -m644 {} "${_instdir}"/{} \;
+ find . -type f -name '*inc' -exec install -m644 {} "${_instdir}"/{} \;
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/roundcubemail-plugin-twofactor-git.install b/roundcubemail-plugin-twofactor-git.install
new file mode 100644
index 00000000000..0ef6de714a9
--- /dev/null
+++ b/roundcubemail-plugin-twofactor-git.install
@@ -0,0 +1,11 @@
+post_install() {
+ echo
+ echo "Copy /usr/share/webapps/roundcubemail/plugins/twofactor_gauthenticator/config.inc.php.dist to /usr/share/webapps/roundcubemail/plugins/twofactor_gauthenticator/config.inc.php and edit to indicate specific user settings."
+ echo
+ echo "Activate the plugin in the Roundcube config.inc.php file:
+
+ \$config['plugins'] = array(
+ 'twofactor_gauthenticator',
+ );"
+ echo
+}