From ef425e0e4b8933e831914eafd7a49f1c6619366d Mon Sep 17 00:00:00 2001 From: Gibheer Date: Wed, 30 Oct 2024 19:27:15 +0100 Subject: add everything for a proper build process --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9a981d7 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +VERSION ?= 0.2 +SOURCE_DATE_EPOCH ?= $(shell date +%s) + +all: gocgi-${VERSION}.tar.gz clean + +gocgi-${VERSION}.tar.gz: gocgi-${VERSION} + tar --sort=name \ + --numeric-owner \ + --owner=0 \ + --group=0 \ + --gzip \ + --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ + -cf gocgi-${VERSION}.tar.gz \ + gocgi-${VERSION} + +gocgi-${VERSION}: + mkdir gocgi-${VERSION} + cp main.go gocgi-${VERSION}/ + cp README.md gocgi-${VERSION}/ + cp go.mod gocgi-${VERSION}/ + cp Makefile gocgi-${VERSION}/ + find gocgi-${VERSION} -print0 | \ + xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + +clean: + rm -R gocgi-${VERSION} -- cgit v1.2.3-70-g09d2