diff options
author | LPB612 | 2019-04-04 22:06:30 -0500 |
---|---|---|
committer | LPB612 | 2019-04-04 22:06:30 -0500 |
commit | b3103955738255defec681813e50a4e896d440f0 (patch) | |
tree | e74831c9af6d91db6276e0f193ee690a0ae99f39 | |
download | aur-b3103955738255defec681813e50a4e896d440f0.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rwxr-xr-x | get-gmail-token | 5 |
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..33c262fc6f84 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = msmtp + pkgdesc = A mini smtp client, with oauth2 hack + pkgver = 1.8.3 + pkgrel = 1 + url = https://marlam.de/msmtp/ + arch = x86_64 + license = GPL3 + makedepends = texlive-plainextra + makedepends = libsecret + makedepends = gsasl + conflicts = msmtp + source = https://marlam.de/msmtp/releases/msmtp-1.8.3.tar.xz + sha256sums = 3cb2eefd33d048f0f82de100ef39a494e44fd1485e376ead31f733d2f36b92b4 + +pkgname = msmtp-oauth2 + pkgdesc = A mini smtp client, with oauth2 hack + depends = libsecret + depends = gsasl + depends = getmail + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..84fc9e4cc93d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: None. Based on msmtp PKGBUILD by +# Eric BĂ©langer <eric@archlinux.org> + +pkgbase=msmtp-oauth2 +pkgname=('msmtp-oauth2') +conflicts=('msmtp') +pkgver=1.8.3 +pkgrel=1 +pkgdesc="A mini smtp client, with oauth2 hack" +arch=('x86_64') +url="https://marlam.de/msmtp/" +license=('GPL3') +makedepends=('texlive-plainextra' 'libsecret' 'gsasl') +source=("https://marlam.de/msmtp/releases/msmtp-$pkgver.tar.xz") +sha256sums=('3cb2eefd33d048f0f82de100ef39a494e44fd1485e376ead31f733d2f36b92b4') + +build() { + cd $pkgbase-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --with-libgsasl + make + make -C doc html pdf +} + +package_msmtp-oauth2() { + pkgdesc="A mini smtp client, with oauth2 hack" + depends=('libsecret' 'gsasl' 'getmail') + + cd $pkgbase-$pkgver/src + sed -i '/"AUTH PLAIN %s", outbuf/{ + s/PLAIN/XOAUTH2/ + s/outbuf/password/ + }' smtp.c + + cd .. + + make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" -C doc install-html install-pdf + +# Installing example configs and scripts to /usr/share/doc/msmtp +# as they are not installed by default (Debian and Gentoo do it this way) + install -d "$pkgdir"/usr/share/doc/msmtp + cp -r scripts/{find_alias,msmtpqueue,msmtpq,set_sendmail} "$pkgdir"/usr/share/doc/msmtp/ + install -D -m644 doc/*.example "$pkgdir"/usr/share/doc/msmtp/ + + install -D -m644 scripts/vim/msmtp.vim "$pkgdir"/usr/share/vim/vimfiles/syntax/msmtp.vim + + chmod 755 "$pkgdir"/usr/share/doc/msmtp/{find_alias,msmtpqueue,set_sendmail}/*.sh + chmod 755 "$pkgdir"/usr/share/doc/msmtp/msmtpq/msmtp* +} diff --git a/get-gmail-token b/get-gmail-token new file mode 100755 index 000000000000..3c27502b8c24 --- /dev/null +++ b/get-gmail-token @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +user="myemail@mydomain.com" +access_token=$(getmail-gmail-xoauth-tokens /path/to/gmail.json) +echo -ne "user=$user\001auth=Bearer $access_token\001\001"| base64 -w0 |