debmaker/ressources/metabase/debmaker
2023-06-12 10:55:41 +02:00

35 lines
732 B
Bash
Executable file

#!/bin/bash
VERSION=0.46.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"
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.sh
}
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
}