diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2021-12-02 17:54:14 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2021-12-02 17:54:14 +0100 |
commit | fa05045d31c05c8928020f05f1d281901d983b2b (patch) | |
tree | 2ed3bac60302bfb14535a169f4b3e10d18fc6120 /Makefile | |
parent | 41d4805d584161ca16b8187194385e47c36422a6 (diff) |
cmd/monfront - import monfront from separate repository
This is the import from the separate monfront repository. The history
could not be imported, but this should suffice.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 33 insertions, 3 deletions
@@ -9,6 +9,8 @@ prefix ?= /usr/local exec_prefix ?= ${prefix} bindir ?= ${exec_prefix}/bin sysconfdir ?= ${prefix}/etc/${NAME} +datarootdir ?= ${prefix}/share +datadir ?= ${datarootdir}/${NAME} WRKDIR ?= build GOBIN ?= go @@ -19,23 +21,51 @@ LDFLAGS += -B ${BUILDID} BUILD_DATE ?= `date +%FT%T%z` LDFLAGS += -X main.BUILD_DATE=${BUILD_DATE} -build: clean +MONFRONT_FILES = $(wildcard cmd/monfront/*.go) $(wildcard *.go) + +all: build + +build: env/${WRKDIR} moncheck monwork monfront + +env/${WRKDIR}: mkdir -p ${WRKDIR} + +moncheck: GOOS=${GOOS} CGO_ENABLED=false go build -ldflags="${LDFLAGS}" -o ${WRKDIR}/moncheck ${PKGNAME}/cmd/moncheck + +monwork: GOOS=${GOOS} CGO_ENABLED=false go build -ldflags="${LDFLAGS}" -o ${WRKDIR}/monwork ${PKGNAME}/cmd/monwork +monfront: + GOOS=${GOOS} CGO_ENABLED=false go build -ldflags="${LDFLAGS}" -o ${WRKDIR}/monfront ${PKGNAME}/cmd/monfront + clean: -rm -r ${WRKDIR} -install: build +install: build preinstall install-monwork install-moncheck install-monfront + +preinstall: install -d -m 0755 ${DESTDIR}${bindir} install -d -m 0755 ${DESTDIR}${sysconfdir} + +install-moncheck: preinstall install -m 0755 ${WRKDIR}/moncheck ${DESTDIR}${bindir} - install -m 0755 ${WRKDIR}/monwork ${DESTDIR}${bindir} install -m 0644 moncheck.conf.example ${DESTDIR}${sysconfdir} + +install-monwork: preinstall + install -m 0755 ${WRKDIR}/monwork ${DESTDIR}${bindir} install -m 0644 monwork.conf.example ${DESTDIR}${sysconfdir} +install-monfront: preinstall + install -m 0755 ${WRKDIR}/monfront ${DESTDIR}${bindir} + install -m 0644 monfront.conf.example ${DESTDIR}${sysconfdir} + install -d -m 0755 ${DESTDIR}${datadir}/templates + sed -i'' "s-\#template_path.*-template_path = \"${datadir}/templates\"-g" ${DESTDIR}${sysconfdir}/monfront.conf.example + find cmd/monfront/templates -type f -exec install -m 0644 "{}" ${DESTDIR}${datadir}/templates \; + package: DESTDIR = ${NAME}-${VERSION} package: install tar -czf ${NAME}-${VERSION}.tar.gz ${DESTDIR} rm -R ${DESTDIR} + +.PHONY: clean build moncheck monwork monfront |