debmaker/ressources/metabase/debmaker

34 lines
745 B
Bash
Executable File

#!/bin/bash
VERSION=0.44.4
APP=metabase
DEPOT=https://github.com/metabase/metabase.git
GIT_VERSION=v$VERSION
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=10
PACKAGE_DEPENDENCY="build-essential default-jdk curl nodejs yarn"
STEP="base_package_upgrade envinit get_git_source build makedeb"
envinit() {
configure_depot_yarn
configure_depot_nodejs
install_package_dependency
install_clojure
}
build() {
cd /tmp/${APP}/
PATH=$PATH:/usr/local/bin
./bin/build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp /tmp/${APP}/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}