summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlfredo Palhares2018-04-18 17:26:44 +0100
committerAlfredo Palhares2018-04-18 17:32:35 +0100
commit7851388062fb15170919f87e0cf48a2548245b6c (patch)
tree9cec9ec85a9e0873776f378e05a3d180534d74cc
downloadaur-7851388062fb15170919f87e0cf48a2548245b6c.tar.gz
Initial Commit
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD71
-rw-r--r--README.md31
-rw-r--r--joplin-cli.sh12
-rw-r--r--joplin.desktop9
-rw-r--r--joplin.sh13
7 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..717bf54db561
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = joplin
+ pkgdesc = Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS.
+ pkgver = 1.0.83
+ pkgrel = 1
+ url = https://joplin.cozic.net
+ arch = x86_64
+ arch = i686
+ license = MIT
+ makedepends = git
+ makedepends = nodejs
+ makedepends = rsync
+ depends = nodejs
+ provides = joplin
+ provides = joplin-cli
+ source = joplin.desktop
+ source = joplin.sh
+ source = joplin-cli.sh
+ source = https://github.com/laurent22/joplin/archive/v1.0.83.zip
+ sha256sums = 87908c016952deebde4c1a1008ae76659b5942770da7d281c211841fc8c036b7
+ sha256sums = 5a3ace64906080adde5a5ea10ec9221fb2d94de770e6ee35b454aa30608b4097
+ sha256sums = 5e3424162814db56718b01740af1ef7c9b30e00f563040456eeb8b7eaca81427
+ sha256sums = 55e9f2870a2f57207b9fc9bcaf9043e081c43fe4783be6249066a9a97f5ad29e
+
+pkgname = joplin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..11a7d507a032
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src/
+pkg
+v*.zip
+*tar.xz
+*~
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5ed14aba1339
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Alfredo Palhares <alfredo@palhares.me>
+
+# Please contribute to:
+# https://github.com/masterkorp/joplin-pkgbuild
+
+pkgname=joplin
+pkgver=1.0.83
+pkgrel=1
+pkgdesc="Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS."
+arch=("x86_64" "i686")
+makedepends=("git" "nodejs" "rsync")
+depends=("nodejs")
+provides=("joplin" "joplin-cli")
+url="https://joplin.cozic.net"
+license=("MIT")
+source=("${pkgname}.desktop" "joplin.sh" "joplin-cli.sh"
+ "https://github.com/laurent22/joplin/archive/v1.0.83.zip")
+sha256sums=("87908c016952deebde4c1a1008ae76659b5942770da7d281c211841fc8c036b7"
+ "5a3ace64906080adde5a5ea10ec9221fb2d94de770e6ee35b454aa30608b4097"
+ "5e3424162814db56718b01740af1ef7c9b30e00f563040456eeb8b7eaca81427"
+ "55e9f2870a2f57207b9fc9bcaf9043e081c43fe4783be6249066a9a97f5ad29e")
+
+build() {
+
+ # Install dependencies for the Tools used on another projects
+ cd "${srcdir}/${pkgname}-${pkgver}/Tools"
+ npm install
+
+ # Build Cli CLient
+ cd "${srcdir}/${pkgname}-${pkgver}/CliClient"
+
+ rsync -a --exclude "node_modules/" "${srcdir}/${pkgname}-${pkgver}/CliClient/app/" \
+ "${srcdir}/${pkgname}-${pkgver}/CliClient/build"
+ rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/CliClient/locales" \
+ "${srcdir}/${pkgname}-${pkgver}/CliClient/build/"
+ rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/ReactNativeClient/lib/" \
+ "${srcdir}/${pkgname}-${pkgver}/CliClient/build/lib"
+ cp "package.json" "${srcdir}/${pkgname}-${pkgver}/CliClient/build"
+ cp "package-lock.json" "${srcdir}/${pkgname}-${pkgver}/CliClient/build"
+
+ cd "${srcdir}/${pkgname}-${pkgver}/CliClient/build/"
+ npm install
+
+ # Electron App
+ cd "${srcdir}/${pkgname}-${pkgver}/ElectronClient/app"
+
+ npm install
+ rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/ReactNativeClient/lib/" \
+ "${srcdir}/${pkgname}-${pkgver}/ElectronClient/app/lib/"
+ npm run compile
+ npm run pack
+}
+
+package() {
+ mkdir -p ${pkgdir}/usr/bin
+ mkdir -p ${pkgdir}/usr/share/{${pkgname},${pkgname}-cli,applications,licenses/${pkgname}}
+
+ cp -R "${srcdir}/${pkgname}-${pkgver}/CliClient/build/"* \
+ "${pkgdir}/usr/share/${pkgname}-cli"
+ cp -R "${srcdir}/${pkgname}-${pkgver}/ElectronClient/app/dist/linux-unpacked/"* \
+ "${pkgdir}/usr/share/${pkgname}"
+
+
+ cd ${srcdir}
+ install -m755 joplin.sh "${pkgdir}/usr/bin/joplin"
+ install -m755 joplin-cli.sh "${pkgdir}/usr/bin/joplin-cli"
+
+ install -Dm644 ../joplin.desktop ${pkgdir}/usr/share/applications/joplin.desktop
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..ecda28d7fa1e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# Joplin - Arch Linux
+
+## Overview
+
+This contains the `PKGBUILD` and other build tools to package
+[Joplin](https://joplin.cozic.net/)
+
+This package contains both the desktop and cli client
+
+## Installing
+
+You can use an AUR wrapper like [yay](https://aur.archlinux.org/packages/yay/)
+
+## Building
+
+Build with makepkg
+
+```
+makepkg -fc
+```
+
+Check more information on the [Archwiki](https://wiki.archlinux.org/index.php/Makepkg)
+
+## Contributing
+
+Please Open a Pull Request or an Issue :)
+
+## Maintainer
+
+ [Alfredo Palhares](https://github.com/masterkorp)
+
diff --git a/joplin-cli.sh b/joplin-cli.sh
new file mode 100644
index 000000000000..0b33d3621464
--- /dev/null
+++ b/joplin-cli.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+readonly joplin_dir="/usr/share/joplin-cli/"
+
+if [[ ! -d $joplin_dir ]]; then
+ echo "Did not found joplin data directory"
+ exit 1
+fi
+
+cd $joplin_dir
+
+node main.js ${@}
diff --git a/joplin.desktop b/joplin.desktop
new file mode 100644
index 000000000000..4e92c454e6e1
--- /dev/null
+++ b/joplin.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=0.7.51
+Name=Joplin
+Comment=Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS.
+Exec=/usr/bin/joplin
+Icon=/usr/share/joplin/resources/build/icons/128x128.png
+Terminal=false
+Type=Application
+Categories=Application;Office;
diff --git a/joplin.sh b/joplin.sh
new file mode 100644
index 000000000000..65496ab152e1
--- /dev/null
+++ b/joplin.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+readonly joplin_dir="/usr/share/joplin/"
+
+if [[ ! -d $joplin_dir ]]; then
+ echo "Did not found joplin data directory"
+ exit 1
+fi
+
+cd $joplin_dir
+
+./joplin "$@"
+