upgpkg: joplin 1.4.19-1

upstream release
Convert to split package
main
Alfredo Palhares 2020-12-08 00:58:34 +00:00
parent f2b10943b5
commit 8db2ffa779
6 changed files with 120 additions and 65 deletions

View File

@ -1,6 +1,6 @@
pkgbase = joplin pkgbase = joplin
pkgdesc = A note taking and to-do application with synchronization capabilities pkgdesc = A note taking and to-do application with synchronization capabilities - Split Package
pkgver = 1.3.18 pkgver = 1.4.19
pkgrel = 1 pkgrel = 1
url = https://joplinapp.org/ url = https://joplinapp.org/
arch = x86_64 arch = x86_64
@ -10,6 +10,24 @@ pkgbase = joplin
makedepends = npm makedepends = npm
makedepends = python makedepends = python
makedepends = rsync makedepends = rsync
conflicts = joplin
conflicts = joplin-beta
source = joplin.desktop
source = joplin-desktop.sh
source = joplin-cli.sh
source = joplin-1.4.19.tar.gz::https://github.com/laurent22/joplin/archive/v1.4.19.tar.gz
sha256sums = c7c5d8b0ff9edb810ed901ea21352c9830bfa286f3c18b1292deca5b2f8febd2
sha256sums = a450284fe66d89aa463d129ce8fff3a0a1a783a64209e4227ee47449d5737be8
sha256sums = 5b6f8847ec0c3848375755213c3009c273f478b4b80ed2c5f0af8f67ee0e94fb
sha256sums = 55aad4fe50e2da980983a69bc7c0870626064db971550d522e266feb17d38916
pkgname = joplin-cli
pkgdesc = A note taking and to-do application with synchronization capabilities - CLI App
depends = nodejs
depends = rsync
pkgname = joplin-desktop
pkgdesc = A note taking and to-do application with synchronization capabilities - Desktop
depends = gtk3 depends = gtk3
depends = libexif depends = libexif
depends = libgsf depends = libgsf
@ -20,14 +38,4 @@ pkgbase = joplin
depends = nss depends = nss
depends = orc depends = orc
optdepends = libappindicator-gtk3: for tray icon optdepends = libappindicator-gtk3: for tray icon
source = joplin.desktop
source = joplin-desktop.sh
source = joplin.sh
source = joplin-1.3.18.tar.gz::https://github.com/laurent22/joplin/archive/v1.3.18.tar.gz
sha256sums = 50c4d294eed7cc1319874831040a316127c3dbc03f8e74a293793a35773e0626
sha256sums = 41bfdc95a6ee285eb644d05eb3bded72a83950d4720c3c8058ddd3c605cd625d
sha256sums = 5245da6f5f647d49fbe044b747994c9f5a8e98b3c2cd02757dd189426a677276
sha256sums = 71f836bb1504b101cc85071e750d183edd4405ff163776a0aff74e6da0ba1906
pkgname = joplin

121
PKGBUILD
View File

@ -4,62 +4,109 @@
# Please contribute to: # Please contribute to:
# https://github.com/alfredopalhares/arch-pkgbuilds # https://github.com/alfredopalhares/arch-pkgbuilds
pkgname=joplin pkgname=('joplin-cli' 'joplin-desktop')
pkgver=1.3.18 pkgbase="joplin"
pkgver=1.4.19
pkgrel=1 pkgrel=1
pkgdesc="A note taking and to-do application with synchronization capabilities" pkgdesc="A note taking and to-do application with synchronization capabilities - Split Package"
arch=('x86_64' 'i686') arch=('x86_64' 'i686')
depends=('gtk3' 'libexif' 'libgsf' 'libjpeg-turbo' 'libwebp' 'libxss' 'nodejs' conflicts=('joplin' 'joplin-beta')
'nss' 'orc')
makedepends=('git' 'npm' 'python' 'rsync') makedepends=('git' 'npm' 'python' 'rsync')
optdepends=('libappindicator-gtk3: for tray icon')
url="https://joplinapp.org/" url="https://joplinapp.org/"
license=('MIT') license=('MIT')
source=("${pkgname}.desktop" "${pkgname}-desktop.sh" "${pkgname}.sh" source=("joplin.desktop" "joplin-desktop.sh" "joplin-cli.sh"
"${pkgname}-${pkgver}.tar.gz::https://github.com/laurent22/joplin/archive/v${pkgver}.tar.gz") "joplin-${pkgver}.tar.gz::https://github.com/laurent22/joplin/archive/v${pkgver}.tar.gz")
sha256sums=('50c4d294eed7cc1319874831040a316127c3dbc03f8e74a293793a35773e0626' sha256sums=('c7c5d8b0ff9edb810ed901ea21352c9830bfa286f3c18b1292deca5b2f8febd2'
'41bfdc95a6ee285eb644d05eb3bded72a83950d4720c3c8058ddd3c605cd625d' 'a450284fe66d89aa463d129ce8fff3a0a1a783a64209e4227ee47449d5737be8'
'5245da6f5f647d49fbe044b747994c9f5a8e98b3c2cd02757dd189426a677276' '5b6f8847ec0c3848375755213c3009c273f478b4b80ed2c5f0af8f67ee0e94fb'
'71f836bb1504b101cc85071e750d183edd4405ff163776a0aff74e6da0ba1906') '55aad4fe50e2da980983a69bc7c0870626064db971550d522e266feb17d38916')
build() { build() {
# Remove husky (git hooks) from dependencies cd "${srcdir}/joplin-${pkgver}"
cd "${srcdir}/${pkgname}-${pkgver}" msg "Disabling husky (git hooks)"
sed -i '/"husky": ".*"/d' package.json sed -i '/"husky": ".*"/d' package.json
# Force Lang # Force Lang
# INFO: https://github.com/alfredopalhares/joplin-pkgbuild/issues/25 # INFO: https://github.com/alfredopalhares/joplin-pkgbuild/issues/25
export LANG=en_US.utf8 export LANG=en_US.utf8
# npm complains for missing execa package - force to install it msg2 "Installing dependencies..."
npm install --cache "${srcdir}/npm-cache" execa npm install
npm install --cache "${srcdir}/npm-cache" npm install compare-version # Joplin Cli needs this
./node_modules/.bin/lerna bootstrap
# CliClient
cd "${srcdir}/${pkgname}-${pkgver}/CliClient"
npm install --cache "${srcdir}/npm-cache"
# Electron App
cd "${srcdir}/${pkgname}-${pkgver}/ElectronClient"
npm install --cache "${srcdir}/npm-cache"
npm run dist
} }
package() { #TODO: A slimdown is needed
cd "${srcdir}/${pkgname}-${pkgver}" package_joplin-cli() {
install -d ${pkgdir}/usr/share/{${pkgname},${pkgname}-cli} pkgdesc="A note taking and to-do application with synchronization capabilities - CLI App"
cp -R CliClient/build/* "${pkgdir}/usr/share/${pkgname}-cli" depends=('nodejs' 'rsync')
cp -R CliClient/node_modules "${pkgdir}/usr/share/${pkgname}-cli"
cp -R ElectronClient/dist/linux-unpacked/* "${pkgdir}/usr/share/${pkgname}"
install -Dm755 ${srcdir}/${pkgname}-desktop.sh "${pkgdir}/usr/bin/${pkgname}-desktop" msg2 "Building CLI..."
install -m755 ${srcdir}/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}" mkdir -p "${pkgdir}/usr/share/joplin-cli/app-cli"
cd "${srcdir}/joplin-${pkgver}/packages/app-cli"
npm run build
cd build
cp -R "." "${pkgdir}/usr/share/joplin-cli/app-cli/"
install -Dm644 ${srcdir}/${pkgname}.desktop -t "${pkgdir}/usr/share/applications" msg2 "Copying Base Node Modules packages..."
cd "${srcdir}/joplin-${pkgver}/packages/app-cli"
cp -R "node_modules/" \
"${pkgdir}/usr/share/joplin-cli/app-cli"
msg2 "Copy CLI Joplin Dependencies..."
cd "${srcdir}/joplin-${pkgver}/packages/"
cp -R "fork-htmlparser2" "${pkgdir}/usr/share/joplin-cli/"
cp -R "fork-sax" "${pkgdir}/usr/share/joplin-cli/"
cp -R "lib/" "${pkgdir}/usr/share/joplin-cli/"
cp -R "renderer/" "${pkgdir}/usr/share/joplin-cli/"
cp -R "tools/" "${pkgdir}/usr/share/joplin-cli/"
#TODO: Check if existing symblinks are valid
msg2 "Fixing @Joplin Symlinks..."
cd "${pkgdir}/usr/share/joplin-cli/"
for dir in $(find . -type d -name "@joplin"); do
cd "${pkgdir}/usr/share/joplin-cli/${dir}"
rm -r *
ln -s "../../../fork-htmlparser2" "fork-htmlparser2"
ln -s "../../../fork-sax" "fork-sax"
ln -s "../../../lib" "lib"
ln -s "../../../renderer" "renderer"
ln -s "../../../tools" "tools"
done
msg2 "Installing LICENSE..."
cd "${srcdir}/joplin-${pkgver}/"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
# Remove unneeded architecture files msg2 "Installing Startup Script"
rm -rf "${pkgdir}/usr/share/${pkgname}/resources/app/node_modules/7zip-bin-linux"/arm* cd "${srcdir}"
install -Dm755 joplin-cli.sh "${pkgdir}/usr/bin/joplin-cli"
}
#TODO: Check for slimdown
package_joplin-desktop() {
pkgdesc="A note taking and to-do application with synchronization capabilities - Desktop"
depends=('gtk3' 'libexif' 'libgsf' 'libjpeg-turbo' 'libwebp' 'libxss' 'nodejs'
'nss' 'orc')
optdepends=('libappindicator-gtk3: for tray icon')
msg2 "Building Desktop..."
mkdir -p "${pkgdir}/usr/share/joplin-desktop"
cd "${srcdir}/joplin-${pkgver}/packages/app-desktop"
USE_HARD_LINKS=false npm run dist -- --publish=never
cd dist/linux-unpacked/
cp -R "." "${pkgdir}/usr/share/joplin-desktop"
msg2 "Installing LICENSE..."
cd "${srcdir}/joplin-${pkgver}/"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
msg2 "Installing startup script and desktop file..."
cd "${srcdir}"
install -Dm755 ${srcdir}/joplin-desktop.sh "${pkgdir}/usr/bin/joplin-desktop"
install -Dm644 ${srcdir}/joplin.desktop -t "${pkgdir}/usr/share/applications"
} }

12
joplin-cli.sh 100644
View File

@ -0,0 +1,12 @@
#!/bin/bash
readonly joplin_dir="/usr/share/joplin-cli/app-cli"
if [[ ! -d $joplin_dir ]]; then
echo "Cannot find /usr/share/joplin-cli/app-cli"
exit 1
fi
cd $joplin_dir
node main.js ${@}

View File

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
readonly joplin_dir="/usr/share/joplin/" readonly joplin_dir="/usr/share/joplin-desktop/"
if [[ ! -d $joplin_dir ]]; then if [[ ! -d $joplin_dir ]]; then
echo "Cannot find /usr/share/joplin/" echo "Cannot find /usr/share/joplin-desktop/"
exit 1 exit 1
fi fi
cd $joplin_dir cd $joplin_dir
./joplin "$@" ./@joplinapp-desktop "$@"

View File

@ -2,7 +2,7 @@
Name=Joplin Name=Joplin
Comment=Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Comment=Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS.
Exec=/usr/bin/joplin-desktop Exec=/usr/bin/joplin-desktop
Icon=/usr/share/joplin/resources/build/icons/128x128.png Icon=/usr/share/joplin-desktop/resources/build/icons/128x128.png
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Application;Office; Categories=Application;Office;

View File

@ -1,12 +0,0 @@
#!/bin/bash
readonly joplin_dir="/usr/share/joplin-cli/"
if [[ ! -d $joplin_dir ]]; then
echo "Cannot find /usr/share/joplin-cli/"
exit 1
fi
cd $joplin_dir
node main.js ${@}