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

46 lines
1 KiB
Bash
Executable file

#!/bin/bash
VERSION=22.2.1
APP=cloudbeaver
DEPOT=https://github.com/dbeaver/cloudbeaver.git
GIT_VERSION=last
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=5
PACKAGE_DEPENDENCY="nodejs yarn maven openjdk-11-jdk"
main(){
base_package_upgrade
envinit
get_git_source
build
makedeb
}
envinit() {
configure_depot_yarn
configure_depot_nodejs 14
install_package_dependency
npm install -g lerna
}
build() {
cd /tmp/${APP}/deploy
./build.sh
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/${APP}/deploy/cloudbeaver ${PATH_DEB}/usr/share/
mv ${PATH_DEB}/usr/share/cloudbeaver/workspace ${PATH_DEB}/var/lib/cloudbeaver/
ln -s /var/lib/cloudbeaver/workspace ${PATH_DEB}/usr/share/cloudbeaver/workspace
mkdir ${PATH_DEB}/etc/
mv ${PATH_DEB}/usr/share/cloudbeaver/conf ${PATH_DEB}/etc/cloudbeaver/
ln -s /etc/cloudbeaver ${PATH_DEB}/usr/share/cloudbeaver/conf
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}