debmaker/ressources/minio/debmaker
2023-07-27 16:29:59 +02:00

32 lines
796 B
Bash
Executable file

#!/bin/bash
VERSION=RELEASE.2023-07-21T21-12-44Z
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=bookworm
IMAGE_SIZE=5
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
}