33 lines
829 B
Bash
Executable file
33 lines
829 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=3.0.1
|
|
APP=joplin-server
|
|
GIT_VERSION=server-v${VERSION}
|
|
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
|
DEPOT=https://github.com/laurent22/joplin.git
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=16
|
|
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() {
|
|
cd /tmp/${APP}/
|
|
BUILD_SEQUENCIAL=1 yarn install
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs/
|
|
|
|
cp -fr /tmp/joplin-server/packages/{lib,utils,turndown-plugin-gfm,turndown,htmlpack,fork-uslug,fork-sax,renderer,fork-htmlparser2,tools,server} ${PATH_DEB}/usr/share/joplin-server/
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|