jjr-joplin/PKGBUILD

72 lines
2.7 KiB
Bash
Raw Normal View History

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-09-02 16:36:10 +02:00
pkgver=1.0.165
2019-01-28 23:46:01 +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")
2018-12-14 09:25:42 +01:00
depends=("nodejs" "gconf")
2018-04-18 18:26:44 +02:00
provides=("joplin" "joplin-cli")
url="https://joplin.cozic.net"
license=("MIT")
2018-04-19 16:02:54 +02:00
source=("${pkgname}.desktop" "joplin-desktop.sh" "joplin.sh"
"https://github.com/laurent22/joplin/archive/v${pkgver}.zip")
2019-09-02 16:36:10 +02:00
sha256sums=('1d5676ded18ae55d31d0dfc8e46a1646a045df94d9c169e68451536ebd9cb653'
2019-01-12 11:23:22 +01:00
'41bfdc95a6ee285eb644d05eb3bded72a83950d4720c3c8058ddd3c605cd625d'
'5245da6f5f647d49fbe044b747994c9f5a8e98b3c2cd02757dd189426a677276'
2019-09-02 16:36:10 +02:00
'a24bd0c1446bbcc88648fe22dc3e1fbbf7029919336504a833a2fee74e64f6a9')
2019-05-13 12:32:49 +02:00
2018-04-18 18:26:44 +02:00
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}/ReactNativeClient/locales" \
"${srcdir}/${pkgname}-${pkgver}/CliClient/build/"
2018-04-18 18:26:44 +02:00
rsync -a --delete "${srcdir}/${pkgname}-${pkgver}/ReactNativeClient/lib/" \
"${srcdir}/${pkgname}-${pkgver}/CliClient/build/lib"
2018-04-18 18:26:44 +02:00
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
2018-04-18 18:26:44 +02:00
# Electron App
2018-04-18 18:26:44 +02:00
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"
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"
install -Dm644 ../joplin.desktop ${pkgdir}/usr/share/applications/joplin.desktop
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
2018-04-18 18:26:44 +02:00
}