From e1ee3aa7c1b2bbc69b5e7ebfc15fa577375ab428 Mon Sep 17 00:00:00 2001 From: fosslinux Date: Fri, 2 Oct 2020 18:44:06 +1000 Subject: [PATCH 1/2] New package: joplin-desktop-1.4.19. --- srcpkgs/joplin-desktop/files/joplin-desktop | 2 ++ srcpkgs/joplin-desktop/files/joplin.desktop | 8 +++++ srcpkgs/joplin-desktop/template | 37 +++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100755 srcpkgs/joplin-desktop/files/joplin-desktop create mode 100644 srcpkgs/joplin-desktop/files/joplin.desktop create mode 100644 srcpkgs/joplin-desktop/template diff --git a/srcpkgs/joplin-desktop/files/joplin-desktop b/srcpkgs/joplin-desktop/files/joplin-desktop new file mode 100755 index 00000000000..ea7f12ba1b0 --- /dev/null +++ b/srcpkgs/joplin-desktop/files/joplin-desktop @@ -0,0 +1,2 @@ +#!/bin/sh +exec electron10 /usr/libexec/joplin-desktop/resources/app.asar "$@" diff --git a/srcpkgs/joplin-desktop/files/joplin.desktop b/srcpkgs/joplin-desktop/files/joplin.desktop new file mode 100644 index 00000000000..37852543a51 --- /dev/null +++ b/srcpkgs/joplin-desktop/files/joplin.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +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-desktop +Icon=/usr/libexec/joplin/resources/build/icons/128x128.png +Terminal=false +Type=Application +Categories=Application;Office; diff --git a/srcpkgs/joplin-desktop/template b/srcpkgs/joplin-desktop/template new file mode 100644 index 00000000000..ff200fcd7c3 --- /dev/null +++ b/srcpkgs/joplin-desktop/template @@ -0,0 +1,37 @@ +# Template file for 'joplin-desktop' +pkgname=joplin-desktop +version=1.4.19 +revision=1 +wrksrc="joplin-${version}" +hostmakedepends="nodejs python3 pkg-config rsync git p7zip tar app-builder + squashfs-tools" +makedepends="libvips-devel libsecret-devel" +depends="electron10" +short_desc="Open source note taking and to-do application - Desktop version" +maintainer="fosslinux " +license="MIT" +homepage="https://joplinapp.org" +distfiles="https://github.com/laurent22/joplin/archive/v${version}.tar.gz" +checksum=55aad4fe50e2da980983a69bc7c0870626064db971550d522e266feb17d38916 + +export USE_SYSTEM_7ZA="true" +export USE_SYSTEM_APP_BUILDER="true" +export USE_SYSTEM_MKSQUASHFS="true" + +do_build() { + # Remove unused modules + rm -rf packages/{app-mobile,app-cli,generator-joplin,app-clipper} + + npm install ${XBPS_ALLOW_CHROOT_BREAKOUT:+--unsafe-perm} + cd packages/app-desktop + npm run dist +} + +do_install() { + vmkdir usr/libexec/joplin-desktop + vcopy packages/app-desktop/dist/linux-unpacked/* usr/libexec/joplin-desktop/ + rm -rf "${DESTDIR}/usr/libexec/joplin-desktop/resources/app.asar.unpacked/node_modules/7zip-bin-linux" + vinstall "${FILESDIR}/joplin.desktop" 644 usr/share/applications/ joplin.desktop + vbin "${FILESDIR}/joplin-desktop" + vlicense LICENSE +} From 2e6434a0e52639c3e88bf7807834700553404e71 Mon Sep 17 00:00:00 2001 From: fosslinux Date: Sat, 5 Dec 2020 13:19:21 +1100 Subject: [PATCH 2/2] New package: joplin-cli-1.4.19. --- srcpkgs/joplin-cli/files/joplin-cli | 3 ++ srcpkgs/joplin-cli/template | 45 +++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 srcpkgs/joplin-cli/files/joplin-cli create mode 100644 srcpkgs/joplin-cli/template diff --git a/srcpkgs/joplin-cli/files/joplin-cli b/srcpkgs/joplin-cli/files/joplin-cli new file mode 100644 index 00000000000..e65e75598db --- /dev/null +++ b/srcpkgs/joplin-cli/files/joplin-cli @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/libexec/joplin-cli/app-cli +node app/main.js "$@" diff --git a/srcpkgs/joplin-cli/template b/srcpkgs/joplin-cli/template new file mode 100644 index 00000000000..2f04a10dd0f --- /dev/null +++ b/srcpkgs/joplin-cli/template @@ -0,0 +1,45 @@ +# Template file for 'joplin-cli' +pkgname=joplin-cli +version=1.4.19 +revision=1 +wrksrc="joplin-${version}" +hostmakedepends="nodejs git python3 pkg-config" +makedepends="libvips-devel libsecret-devel" +depends="nodejs" +short_desc="Open source note taking and to-do application - CLI version" +maintainer="fosslinux " +license="MIT" +homepage="https://joplinapp.org" +distfiles="https://github.com/laurent22/joplin/archive/v${version}.tar.gz" +checksum=55aad4fe50e2da980983a69bc7c0870626064db971550d522e266feb17d38916 +python_version=3 + +do_build() { + # Remove unused modules + rm -rf packages/{app-mobile,app-desktop,app-clipper,generator-joplin} + + npm install ${XBPS_ALLOW_CHROOT_BREAKOUT:+--unsafe-perm} + + cd packages + # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=joplin-cli#n30 + # Unsure why this is needed, but it is + for d in app-cli lib renderer tools; do + pushd "${d}" + mv node_modules/@joplin . + npm prune --production + mv @joplin node_modules/ + popd + done +} + +do_install() { + cd packages + + vmkdir usr/libexec/joplin-cli + for d in app-cli fork-sax fork-htmlparser2 renderer lib tools; do + vcopy "${d}" usr/libexec/joplin-cli/ + done + + vbin "${FILESDIR}/joplin-cli" + vlicense ../LICENSE +}