2018-04-18 18:26:44 +02:00
|
|
|
# Maintainer: Alfredo Palhares <alfredo@palhares.me>
|
|
|
|
|
|
|
|
# Please contribute to:
|
|
|
|
# https://github.com/masterkorp/joplin-pkgbuild
|
|
|
|
|
|
|
|
pkgname=joplin
|
2019-11-13 15:54:00 +01:00
|
|
|
pkgver=1.0.174
|
2019-11-11 14:59:11 +01:00
|
|
|
pkgrel=1
|
2018-04-18 18:26:44 +02:00
|
|
|
pkgdesc="Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS."
|
|
|
|
arch=("x86_64" "i686")
|
2019-06-25 18:00:01 +02:00
|
|
|
makedepends=("git" "nodejs" "rsync" "npm" "python")
|
2019-11-18 12:19:33 +01:00
|
|
|
depends=("nodejs" "gconf" "libxss")
|
2018-04-18 18:26:44 +02:00
|
|
|
provides=("joplin" "joplin-cli")
|
|
|
|
url="https://joplin.cozic.net"
|
|
|
|
license=("MIT")
|
2019-09-02 16:36:35 +02:00
|
|
|
source=("joplin.desktop" "joplin-desktop.sh" "joplin.sh"
|
2018-05-02 14:17:56 +02:00
|
|
|
"https://github.com/laurent22/joplin/archive/v${pkgver}.zip")
|
2019-11-13 15:54:00 +01:00
|
|
|
sha256sums=('0e5bb18c26be2e47cac8ccc4ffc76c16c36c989cc3e01cb09da1ad314ca44910'
|
2019-01-12 11:23:22 +01:00
|
|
|
'41bfdc95a6ee285eb644d05eb3bded72a83950d4720c3c8058ddd3c605cd625d'
|
|
|
|
'5245da6f5f647d49fbe044b747994c9f5a8e98b3c2cd02757dd189426a677276'
|
2019-11-13 15:54:00 +01:00
|
|
|
'd6be95b4a2db86c71e3e5627b8d94b53ecc04f3a3697106f08ebee4836ccca0c')
|
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
|
2018-04-18 18:26:44 +02:00
|
|
|
|
|
|
|
# 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"
|
2018-04-27 12:24:00 +02:00
|
|
|
rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/ReactNativeClient/locales" \
|
|
|
|
"${srcdir}/${pkgname}-${pkgver}/CliClient/build/"
|
2018-04-18 18:26:44 +02:00
|
|
|
rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/ReactNativeClient/lib/" \
|
2018-04-27 12:24:00 +02:00
|
|
|
"${srcdir}/${pkgname}-${pkgver}/CliClient/build/lib"
|
2018-04-18 18:26:44 +02:00
|
|
|
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}/CliClient/build/"
|
2019-09-02 16:37:04 +02:00
|
|
|
# NOTE: Manually forcing sqlite 4.0.7 for node v12, remove later on
|
2018-04-27 12:24:00 +02:00
|
|
|
npm install
|
2018-04-18 18:26:44 +02:00
|
|
|
|
2018-04-27 12:24:00 +02:00
|
|
|
# Electron App
|
2018-04-18 18:26:44 +02:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}/ElectronClient/app"
|
|
|
|
|
2019-09-02 17:28:03 +02:00
|
|
|
# NOTE: Manually forcing sqlite 4.0.7 for node v12, remove later on
|
|
|
|
npm install sqlite3@4.0.7
|
2018-04-18 18:26:44 +02:00
|
|
|
npm install
|
2019-10-29 15:45:05 +01:00
|
|
|
# Remove uneeed .vscode path that comes with it
|
2019-11-11 14:59:11 +01:00
|
|
|
rm -r node_modules/sqlite3/.vscode
|
2019-10-29 15:45:05 +01:00
|
|
|
|
2018-04-18 18:26:44 +02:00
|
|
|
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/"* \
|
2018-04-27 12:24:00 +02:00
|
|
|
"${pkgdir}/usr/share/${pkgname}-cli"
|
2019-09-10 16:31:44 +02:00
|
|
|
cp -R "${srcdir}/${pkgname}-${pkgver}/CliClient/node_modules" \
|
|
|
|
"${pkgdir}/usr/share/${pkgname}-cli"
|
2019-11-04 15:23:10 +01:00
|
|
|
# Remove uneeded .vscode from a dependency
|
|
|
|
rm -r "${pkgdir}/usr/share/${pkgname}-cli/node_modules/sqlite3/.vscode"
|
2018-04-18 18:26:44 +02:00
|
|
|
cp -R "${srcdir}/${pkgname}-${pkgver}/ElectronClient/app/dist/linux-unpacked/"* \
|
|
|
|
"${pkgdir}/usr/share/${pkgname}"
|
|
|
|
|
|
|
|
|
|
|
|
cd ${srcdir}
|
2018-04-19 16:45:58 +02:00
|
|
|
install -m755 joplin-desktop.sh "${pkgdir}/usr/bin/joplin-desktop"
|
2018-04-18 18:26:44 +02:00
|
|
|
install -m755 joplin.sh "${pkgdir}/usr/bin/joplin"
|
|
|
|
|
2019-09-02 16:38:46 +02:00
|
|
|
install -Dm644 joplin.desktop "${pkgdir}/usr/share/applications/joplin.desktop"
|
2018-04-27 12:24:00 +02:00
|
|
|
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
|
|
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
2018-04-18 18:26:44 +02:00
|
|
|
}
|