debmaker/ressources/joplin-desktop/debmaker
2023-07-11 23:15:31 +02:00

36 lines
834 B
Bash
Executable file

#!/bin/bash
VERSION=2.12.4
APP=joplin-desktop
GIT_VERSION=v${VERSION}
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEPOT=https://github.com/laurent22/joplin.git
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=10
PACKAGE_DEPENDENCY="build-essential python-is-python3 nodejs rsync yarn"
main(){
base_package_upgrade
configure_depot_yarn
configure_depot_nodejs
install_package_dependency
get_git_source
build
makedeb
}
build() {
rm -fr /tmp/${APP}/packages/app-mobile
cd /tmp/${APP}/
BUILD_SEQUENCIAL=1 yarn install
cd packages/app-desktop
npm run dist
}
makedeb(){
PATH_DEB=/tmp/src/rootfs/
cp /tmp/joplin-desktop/packages/app-desktop/dist/Joplin-*.AppImage ${PATH_DEB}/usr/share/joplin/Joplin.AppImage
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}