summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD85
-rw-r--r--credentials.js4
-rw-r--r--openwmail.desktop8
-rw-r--r--openwmail.sh3
5 files changed, 94 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6289d9785b55..d88a6b5cb443 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,23 @@
pkgbase = openwmail
- pkgdesc = openwmail
+ pkgdesc = The missing desktop client for Gmail & Google Inbox
pkgver = 1.0.0
- pkgrel = 4
- url = https://github.com/openwmail/openwmail
+ pkgrel = 1
+ url = https://openwmail.github.io/
arch = x86_64
- license = MLP-2.0
- depends = libnotify
- depends = gconf
- source_x86_64 = https://github.com/openWMail/openWMail/releases/download/v1.0.0/openWMail_1-0-0_Linux_x86_64.deb
- md5sums_x86_64 = d84ceea682905b58531c43f5962317fb
+ license = MPL
+ makedepends = git
+ makedepends = npm
+ makedepends = python2
+ depends = electron
+ options = !strip
+ source = openWMail-1.0.0.tar.gz::https://github.com/openWMail/openwmail/archive/v1.0.0.tar.gz
+ source = openwmail.sh
+ source = openwmail.desktop
+ source = credentials.js
+ sha256sums = 445f54c02e3b83a5e5997eede34b3c969a67b3bd15f5f921b53e626f2777ebde
+ sha256sums = 5fa3dc9f2c022deab663541ec6269761d2683db0e1edc0d806ebd23a806bc0bd
+ sha256sums = dbc45544162aeebf06ce8037c53c67642c1e170824828d6ee87c0f5435050750
+ sha256sums = f51147540936c439249076b96679da2fc971ea00c9220d736b12f0879ed89467
pkgname = openwmail
diff --git a/PKGBUILD b/PKGBUILD
index ca3c149a7973..52a2d55877c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,73 @@
-# Maintainer: Aaron Ogle <aaron@geekgonecrazy.com>
+# $Id$
+# Contributor: Balló György <ballogyor+arch at gmail dot com>
pkgname=openwmail
+_pkgname=openWMail
pkgver=1.0.0
-pkgverdash=1-0-0
-pkgrel=4
-pkgdesc="openwmail"
-arch=('x86_64')
-license=('MLP-2.0')
-url="https://github.com/openwmail/openwmail"
-options=()
+pkgrel=1
+pkgdesc="The missing desktop client for Gmail & Google Inbox"
+arch=(x86_64)
+url="https://openwmail.github.io/"
+license=(MPL)
+depends=(electron)
+makedepends=(git npm python2)
+options=(!strip)
+source=($_pkgname-$pkgver.tar.gz::https://github.com/openWMail/$pkgname/archive/v$pkgver.tar.gz
+ $pkgname.sh
+ $pkgname.desktop
+ credentials.js)
+sha256sums=('445f54c02e3b83a5e5997eede34b3c969a67b3bd15f5f921b53e626f2777ebde'
+ '5fa3dc9f2c022deab663541ec6269761d2683db0e1edc0d806ebd23a806bc0bd'
+ 'dbc45544162aeebf06ce8037c53c67642c1e170824828d6ee87c0f5435050750'
+ 'f51147540936c439249076b96679da2fc971ea00c9220d736b12f0879ed89467')
-source_x86_64=("https://github.com/openWMail/openWMail/releases/download/v${pkgver}/openWMail_${pkgverdash}_Linux_x86_64.deb")
-md5sums_x86_64=('d84ceea682905b58531c43f5962317fb')
+build() {
+ cd $_pkgname-$pkgver
+ sed -i "s/ROOT_DIR, 'package.json'/__dirname, 'package.json'/" src/app/webpack.config.js
+ sed -i 's|"wmail-spellchecker": "openWMail/wmail-spellchecker#1.0.5"|"nodehun": "2.0.11"|' src/app/package.json
+ sed -i 's/wmail-spellchecker/nodehun/' src/scenes/platform/src/webviewInjection/Browser/Spellchecker.js
-depends=('libnotify' 'gconf')
-optdepends=()
+ cp ../credentials.js src/shared/credentials.js
+ npm install
+ pushd src/scenes/mailboxes
+ npm install
+ popd
+ node_modules/.bin/webpack
+ cd bin/app
+ PYTHON=python2 npm install --production
+ npm rebuild --runtime=electron --target=$(</usr/lib/electron/version) --disturl=https://atom.io/download/electron --build-from-source
+}
package() {
- echo "package freaking base ${pkgbase}"
- cd "${srcdir}"
+ mkdir -p "$pkgdir"/usr/{lib,share}
+ cp -r $_pkgname-$pkgver/bin "$pkgdir/usr/lib/$pkgname"
- tar xf data.tar.gz -C "${pkgdir}"
+ for s in 16 24 32 48 64 96 128 256 512; do
+ install -Dm644 $_pkgname-$pkgver/assets/icons/app_$s.png "$pkgdir"/usr/share/icons/hicolor/${s}x${s}/apps/mailspring.png
+ done
- chmod 755 $pkgdir/opt
- chmod 755 $pkgdir/usr
- chmod 755 $pkgdir/usr/share
- chmod 755 $pkgdir/usr/share/applications
+ install -Dm644 $_pkgname-$pkgver/assets/icons/app.svg "$pkgdir"/usr/share/icons/hicolor/scalable/apps/mailspring.svg
+ install -Dm755 $pkgname.sh "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 $pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
- mkdir -p "$pkgdir/usr/bin"
- chmod +x $pkgdir/opt/openwmail/openWMail
- ln -s $pkgdir/opt/openwmail/openWMail ${pkgdir}/usr/bin
+ # Clean up
+ find "$pkgdir/usr/lib/$pkgname/app/node_modules" \
+ -name "package.json" \
+ -exec sed -e "s|$srcdir/$_pkgname|/usr/lib/$pkgname|" \
+ -i {} \; \
+ -or -name ".*" -prune -exec rm -r '{}' \; \
+ -or -name "*.gyp" -prune -exec rm -r '{}' \; \
+ -or -name "*.gypi" -prune -exec rm -r '{}' \; \
+ -or -name "*.mk" -prune -exec rm -r '{}' \; \
+ -or -name "*Makefile" -prune -exec rm -r '{}' \; \
+ -or -name "bin" -prune -exec rm -r '{}' \; \
+ -or -name "deps" -prune -exec rm -r '{}' \; \
+ -or -name "doc" -prune -exec rm -r '{}' \; \
+ -or -name "example" -prune -exec rm -r '{}' \; \
+ -or -name "man" -prune -exec rm -r '{}' \; \
+ -or -name "nan" -prune -exec rm -r '{}' \; \
+ -or -name "obj.target" -prune -exec rm -r '{}' \; \
+ -or -name "script" -prune -exec rm -r '{}' \; \
+ -or -name "test" -prune -exec rm -r '{}' \; \
+ -or -name "tmp" -prune -exec rm -r '{}' \;
}
-
diff --git a/credentials.js b/credentials.js
new file mode 100644
index 000000000000..7650d4bdf06c
--- /dev/null
+++ b/credentials.js
@@ -0,0 +1,4 @@
+module.exports = Object.freeze({
+ GOOGLE_CLIENT_ID : '1053042415879-d5ovd4m4n912afqe4nsi3evjav9rnq4q.apps.googleusercontent.com',
+ GOOGLE_CLIENT_SECRET: 'NvgK21EMsvk8Sjd2iF1NNGGG'
+});
diff --git a/openwmail.desktop b/openwmail.desktop
new file mode 100644
index 000000000000..726cb2baf901
--- /dev/null
+++ b/openwmail.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=openWMail
+Comment=The missing desktop client for Gmail & Google Inbox
+Exec=openwmail
+Icon=openwmail
+Categories=Network;Email;
diff --git a/openwmail.sh b/openwmail.sh
new file mode 100644
index 000000000000..f7a37dd3492a
--- /dev/null
+++ b/openwmail.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+electron /usr/lib/openwmail/app