debmaker/ressources/mailhog/debmaker
2022-11-21 22:52:21 +01:00

33 lines
643 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
PACKAGE_DEPENDENCY="build-essential"
main() {
base_package_upgrade
install_package_dependency
install_go
get_git_source
build
makedeb
}
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
}