debmaker/ressources/minio/debmaker
2022-10-08 04:56:45 +02:00

32 lines
796 B
Bash
Executable file

#!/bin/bash
VERSION=RELEASE.2022-10-05T14-58-27Z
APP=minio
DEPOT=https://github.com/minio/minio.git
GIT_VERSION=$VERSION
DEB_VERSION=${VERSION:8:4}${VERSION:13:2}${VERSION:16:2}${VERSION:19:2}${VERSION:22:2}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4
PACKAGE_DEPENDENCY="build-essential"
main(){
base_package_upgrade
install_package_dependency
install_go
get_git_source
build
makedeb
}
build() {
cd /tmp/${APP}
make build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
for tmp in $(grep MINIO_ internal/config/constants.go | cut -d '"' -f 2); do echo "#$tmp=" ; done > ${PATH_DEB}/etc/default/minio
cp /tmp/minio/minio ${PATH_DEB}/usr/bin/minio
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}