debmaker/ressources/metabase/debmaker
2022-12-08 06:42:53 +01:00

35 lines
729 B
Bash
Executable file

#!/bin/bash
VERSION=0.45.1
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"
main(){
base_package_upgrade
configure_depot_yarn
configure_depot_nodejs
install_package_dependency
install_clojure
get_git_source
build
makedeb
}
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
}