diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 49 |
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ed7897a45bbf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = safe-mail-tutorial + pkgdesc = A tutorial app showcasing how to use the low level API from safe_app_nodejs library to build a simple email application. + pkgver = 0.4.0 + pkgrel = 1 + url = https://github.com/maidsafe/safe_examples + arch = i686 + arch = x86_64 + groups = maidsafe + license = GPL3 + makedepends = nvm + depends = safe-browser + source = https://github.com/maidsafe/safe_examples/archive/alpha-2.tar.gz + md5sums = 9f2fd11606650443355a3641e8ba8cd6 + +pkgname = safe-mail-tutorial + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a8bd7f92013c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Bartłomiej Kamiński <bartlomiej.kaminski@maidsafe.net> +pkgname=safe-mail-tutorial +pkgver=0.4.0 +pkgrel=1 +pkgdesc="A tutorial app showcasing how to use the low level API from safe_app_nodejs library to build a simple email application." +arch=('i686' 'x86_64') +url="https://github.com/maidsafe/safe_examples" +license=('GPL3') +groups=('maidsafe') +depends=('safe-browser') +makedepends=('nvm') +optdepends=() +install= +changelog= +source=('https://github.com/maidsafe/safe_examples/archive/alpha-2.tar.gz') +md5sums=('9f2fd11606650443355a3641e8ba8cd6') + +build() { + # use nvm + . /usr/share/nvm/nvm.sh + + # prepare nvm dir + mkdir -p $HOME/.nvm-tmp + export NVM_DIR=$HOME/.nvm-tmp + nvm install 7.10.0 + + # load dependencies for safe-browser + cd "safe_examples-alpha-2/email_app" + npm install + npm run package + + nvm unload + rm -rf $HOME/.nvm-tmp +} + +package() { + cd "safe_examples-alpha-2/email_app/out" + mkdir -p "$pkgdir/opt/maidsafe" + mkdir -p "$pkgdir/usr/bin" + case $CARCH in + "i686") + mv safe-mail-tutorial-linux-x86 "$pkgdir/opt/maidsafe/$pkgname-$pkgver" + ;; + "x86_64") + mv safe-mail-tutorial-linux-x64 "$pkgdir/opt/maidsafe/$pkgname-$pkgver" + ;; + esac + ln -s "/opt/maidsafe/$pkgname-$pkgver/safe-mail-tutorial" "$pkgdir/usr/bin/safe-mail-tutorial" +} |