From a446bce8e632af3239284e658b8b5ce0c81147fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Wed, 24 Sep 2025 13:00:07 +0200 Subject: [PATCH] add packing for zipped builds --- .gitignore | 1 + Makefile | 27 +++++++++++++++++++++++++++ template/template.typ | 8 ++++++++ 3 files changed, 36 insertions(+) diff --git a/.gitignore b/.gitignore index 2bd18fa..0bc147a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /*.pdf +/pack diff --git a/Makefile b/Makefile index 5959e6a..f1624e3 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,33 @@ view_example: example.pdf .PHONY: example example: example.pdf +TO_PACK := $(shell find template -type f) template/LICENSE +PACK_TARGETS := $(TO_PACK:%=pack/tultemplate2/%) pack/tultemplate2/example.typ + +.PHONY: pack +pack: pack/tultemplate2.zip + +.PHONY: clean +clean: + rm -rf pack + rm -f example.pdf + +pack/tultemplate2.zip: $(PACK_TARGETS) + @mkdir -p $(@D) + rm -f $@ + cd pack && zip -r tultemplate2.zip tultemplate2 + +pack/tultemplate2/example.typ: example.typ + ln -f $< $@ + +pack/tultemplate2/template/LICENSE: LICENSE + @mkdir -p $(@D) + ln -f $< $@ + +pack/tultemplate2/template/%: template/% + @mkdir -p $(@D) + ln -f $< $@ + TEMPLATE_SRCS := $(shell find template -type f) %.pdf: %.typ $(TEMPLATE_SRCS) diff --git a/template/template.typ b/template/template.typ index ea3a6d5..5af5eb7 100644 --- a/template/template.typ +++ b/template/template.typ @@ -1,3 +1,11 @@ +// +---------------+ +// | TULTemplate 2 | +// +---------------+ +// +// Unofficial TUL template for all kinds of documents. +// +// Git: https://git.zumepro.cz/tul/tultemplate2 + #import "prototyping.typ": todo, profile #let tultemplate(