2020-01-27 18:51:36 +01:00
|
|
|
# Maintainer: Alfredo Palhares <alfredo at palhares dot me>
|
|
|
|
# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
|
2018-04-18 18:26:44 +02:00
|
|
|
|
|
|
|
# Please contribute to:
|
|
|
|
# https://github.com/masterkorp/joplin-pkgbuild
|
|
|
|
|
|
|
|
pkgname=joplin
|
2020-04-16 18:20:37 +02:00
|
|
|
pkgver=1.0.201
|
2020-03-23 12:18:53 +01:00
|
|
|
pkgrel=1
|
2020-01-27 18:51:36 +01:00
|
|
|
pkgdesc="A note taking and to-do application with synchronization capabilities"
|
|
|
|
arch=('x86_64' 'i686')
|
2020-01-28 12:05:00 +01:00
|
|
|
depends=('gtk3' 'libexif' 'libgsf' 'libjpeg-turbo' 'libwebp' 'libxss' 'nodejs'
|
2020-01-27 18:51:36 +01:00
|
|
|
'nss' 'orc')
|
|
|
|
makedepends=('git' 'npm' 'python' 'rsync')
|
|
|
|
optdepends=('libappindicator-gtk3: for tray icon')
|
2020-01-05 14:55:22 +01:00
|
|
|
url="https://joplinapp.org/"
|
2020-01-27 18:51:36 +01:00
|
|
|
license=('MIT')
|
|
|
|
source=("${pkgname}.desktop" "${pkgname}-desktop.sh" "${pkgname}.sh"
|
2020-03-13 16:22:04 +01:00
|
|
|
"${pkgname}-${pkgver}.tar.gz::https://github.com/laurent22/joplin/archive/v${pkgver}.tar.gz")
|
2020-04-16 18:20:37 +02:00
|
|
|
sha256sums=('f981b7777393c33784d39ec7fca2c83ee429c542d462f2b421b73f7ba6ca7702'
|
2019-01-12 11:23:22 +01:00
|
|
|
'41bfdc95a6ee285eb644d05eb3bded72a83950d4720c3c8058ddd3c605cd625d'
|
|
|
|
'5245da6f5f647d49fbe044b747994c9f5a8e98b3c2cd02757dd189426a677276'
|
2020-04-16 18:20:37 +02:00
|
|
|
'85dac14984fbeb5a9c7c4e49db90a5a87b970f8c4cb5e1f3805751c6c1268925')
|
2019-05-13 12:32:49 +02:00
|
|
|
|
2018-04-18 18:26:44 +02:00
|
|
|
build() {
|
2019-08-30 01:14:52 +02:00
|
|
|
# Remove husky (git hooks) from dependencies
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
sed -i '/"husky": ".*"/d' package.json
|
2020-01-07 17:23:47 +01:00
|
|
|
|
|
|
|
# Force Lang
|
|
|
|
# INFO: https://github.com/alfredopalhares/joplin-pkgbuild/issues/25
|
|
|
|
export LANG=en_US.utf8
|
|
|
|
|
2020-03-13 16:22:04 +01:00
|
|
|
# npm complains for missing execa package - force to install it
|
|
|
|
npm install --cache "${srcdir}/npm-cache" execa
|
2020-01-27 18:51:36 +01:00
|
|
|
npm install --cache "${srcdir}/npm-cache"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2020-03-13 16:22:04 +01:00
|
|
|
# CliClient
|
2018-04-18 18:26:44 +02:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}/CliClient"
|
2020-01-27 18:51:36 +01:00
|
|
|
npm install --cache "${srcdir}/npm-cache"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2018-04-27 12:24:00 +02:00
|
|
|
# Electron App
|
2020-03-13 16:22:04 +01:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}/ElectronClient"
|
2020-01-27 18:51:36 +01:00
|
|
|
npm install --cache "${srcdir}/npm-cache"
|
2020-03-13 19:24:09 +01:00
|
|
|
npm run dist
|
2019-10-29 15:45:05 +01:00
|
|
|
|
2018-04-18 18:26:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-01-27 18:51:36 +01:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
install -d ${pkgdir}/usr/share/{${pkgname},${pkgname}-cli}
|
|
|
|
cp -R CliClient/build/* "${pkgdir}/usr/share/${pkgname}-cli"
|
|
|
|
cp -R CliClient/node_modules "${pkgdir}/usr/share/${pkgname}-cli"
|
2020-03-13 16:22:04 +01:00
|
|
|
cp -R ElectronClient/dist/linux-unpacked/* "${pkgdir}/usr/share/${pkgname}"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2020-01-27 18:51:36 +01:00
|
|
|
install -Dm755 ${srcdir}/${pkgname}-desktop.sh "${pkgdir}/usr/bin/${pkgname}-desktop"
|
|
|
|
install -m755 ${srcdir}/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2020-01-27 18:51:36 +01:00
|
|
|
install -Dm644 ${srcdir}/${pkgname}.desktop -t "${pkgdir}/usr/share/applications"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2020-01-27 18:51:36 +01:00
|
|
|
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2020-01-27 18:51:36 +01:00
|
|
|
# Remove unneeded architecture files
|
|
|
|
rm -rf "${pkgdir}/usr/share/${pkgname}/resources/app/node_modules/7zip-bin-linux"/arm*
|
2018-04-18 18:26:44 +02:00
|
|
|
}
|