summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkausban2020-04-17 11:58:27 +0200
committerkausban2020-04-17 11:58:27 +0200
commitdc12a75575ab19e697578225c9c75adea7a91949 (patch)
treedc46ec897273bb5bf3053d9a9ef5984b6d04c425
downloadaur-dc12a75575ab19e697578225c9c75adea7a91949.tar.gz
first commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD46
-rw-r--r--bridge.service12
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e99530e8ae8b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = protonmail-bridge-nogui
+ pkgdesc = Integrate ProtonMail paid account with any program that supports IMAP and SMTP
+ pkgver = 1.2.6
+ pkgrel = 1
+ url = https://www.protonmail.com/bridge
+ arch = x86_64
+ license = GPL3
+ makedepends = go
+ makedepends = gcc
+ depends = libsecret
+ depends = screen
+ optdepends = gnome-keyring: supported password manager (password manager is required)
+ optdepends = pass: supported password manager (password manager is required)
+ conflicts = protonmail-bridge-bin
+ conflicts = protonmail-bridge
+ options = !emptydirs
+ options = !strip
+ source = git://github.com/ProtonMail/proton-bridge.git
+ source = bridge.service
+ sha256sums = SKIP
+ sha256sums = 07cc30765dd43307a995ac4f3aed5dee4d6af7e2bc32a21a1201d888a39603c0
+
+pkgname = protonmail-bridge-nogui
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5c6873addaba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: kausban <mail at kausban com>
+# Contributor: Ali Molaei <ali dot molaei at protonmail dot com>
+# Contributor: Lenovsky <lenovsky at pm dot me>
+# Contributor: aimileus <me at aimileus dot nl>
+
+# Minimal fork of https://aur.archlinux.org/packages/protonmail-bridge/
+# Compiled with 'nogui' option
+# Included is a user systemd service. Try: systemctl status --user bridge.service
+# You can login and register accounts using the interactive cli
+# Names screen session accessible as: screen -R -S bridgedaemon
+
+pkgname=protonmail-bridge-nogui
+pkgver=1.2.6
+pkgrel=1
+pkgdesc="Integrate ProtonMail paid account with any program that supports IMAP and SMTP"
+arch=('x86_64')
+url="https://www.protonmail.com/bridge"
+license=('GPL3')
+makedepends=('go' 'gcc')
+depends=('libsecret' 'screen')
+optdepends=(
+ 'gnome-keyring: supported password manager (password manager is required)'
+ 'pass: supported password manager (password manager is required)'
+)
+conflicts=('protonmail-bridge-bin' 'protonmail-bridge')
+options=('!emptydirs' '!strip')
+source=("git://github.com/ProtonMail/proton-bridge.git"
+ "bridge.service")
+sha256sums=('SKIP'
+ '07cc30765dd43307a995ac4f3aed5dee4d6af7e2bc32a21a1201d888a39603c0')
+
+prepare() {
+ cd ${srcdir}/proton-bridge/
+ sed -i 's/pmapi_prod/pmapi_prod nogui/' Makefile
+ export PATH=$PATH:$(go env GOPATH)/bin/
+ make clean
+ make build
+}
+
+package() {
+ install -Dm644 "${srcdir}"/bridge.service -t "${pkgdir}"/usr/lib/systemd/user/
+ cd "${srcdir}"/proton-bridge/cmd/Desktop-Bridge/deploy/linux
+ install -Dm644 ./LICENSE -t "${pkgdir}"/usr/share/licenses/"${pkgname}"/
+ install -Dm644 ./Changelog.md -t "${pkgdir}"/usr/share/doc/"${pkgbame}"/
+ install -Dm755 ./proton-bridge "${pkgdir}"/usr/bin/protonmail-bridge
+}
diff --git a/bridge.service b/bridge.service
new file mode 100644
index 000000000000..66f9bcccb530
--- /dev/null
+++ b/bridge.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Desktop-Bridge: Protonmail Bridge - ProtonMail IMAP and SMTP Bridge
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/screen -Dm -S bridgedaemon sh -c "sleep 5; protonmail-bridge -c"
+Restart=always
+ExecStop=/usr/bin/screen -X -S bridgedaemon quit
+KillMode=process
+
+[Install]
+WantedBy=default.target