debmaker/ressources/mailhog/debmaker
2022-08-17 20:35:16 +02:00

30 lines
655 B
Bash
Executable file

#!/bin/bash
VERSION=1.1.0
APP=mailhog
DEPOT=https://github.com/mailhog/MailHog.git
GIT_VERSION=v$VERSION-beta1
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=2
STEP="base_package_upgrade envinit base_package_upgrade build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential
install_go
}
build() {
cd /tmp/${APP}
PATH=$PATH:/usr/local/go/bin
go build -o mailhog main.go
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp /tmp/${APP}/mailhog ${PATH_DEB}/usr/bin/mailhog
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}