aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
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}