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}