debmaker/ressources/joplin-server/debmaker
2022-11-19 19:56:01 +01:00

31 lines
861 B
Bash
Executable file

#!/bin/bash
VERSION=2.9.7
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=bullseye
IMAGE_SIZE=10
STEP="base_package_upgrade envinit default_prebuild build makedeb"
envinit() {
configure_depot_yarn
configure_depot_nodejs
apt install -y --no-install-recommends build-essential python nodejs rsync yarn
}
build() {
rm -fr /tmp/${APP}/packages/app-mobile
cd /tmp/${APP}/
BUILD_SEQUENCIAL=1 yarn install
}
makedeb(){
PATH_DEB=/tmp/src/rootfs/
cp -fr /tmp/joplin-server/packages/{lib,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
}