aboutsummaryrefslogtreecommitdiff
blob: 3a7c625e3c4e2501a5fe938b3c99fc0e261b7640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
include Makefile.common

CONTENTS=YOU_NEED_TO_SET_CONTENTS_VARIABLE_TO_GENERATE_VERSIONNED_LZMA_FILES

$(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz:
	wget $(CTAN_MIRROR)/systems/texlive/tlnet/archive/$(@:$(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz=%.tar.xz) -O $@

#wget $(TUG)/tlnet/archive/$(@:$(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz=%.tar.xz) -O $@

$(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.lzma: $(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz
	xz -d $<
	lzma $(<:%.xz=%)

versionnedzips: $(CONTENTS:%=$(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz)

%.tlplic: %.unpacked
	cp $(@:%.tlplic=tlunpackdir/tlpkg/tlpobj/%.tlpobj) $@

tlplic: $(CONTENTS:%=%.tlplic)

%.tlpobj: $(TL_TRUNK)/Master/tlpkg/tlpsrc/%.tlpsrc
	$(TL_TRUNK)/Master/tlpkg/bin/tl-update-tlpdb -master=$(TL_TRUNK)/Master -output=$@ --tlpsrc-from-cmdline $<

%.cataloguehtml:
	curl -I http://www.ctan.org/pkg/$(@:%.cataloguehtml=%) | grep 404 || wget -O $@ http://www.ctan.org/pkg/$(@:%.cataloguehtml=%)
	touch $@

cataloguehtml: $(CONTENTS:%=%.cataloguehtml)

tldir:
	mkdir tlunpackdir
	touch $@

%.unpacked: $(DISTDIR)/texlive-module-%-$(TEXLIVE_VERSION).tar.xz tldir
	xz -dc $< | tar xof - -C tlunpackdir
	touch $@

tlpobj: $(CONTENTS:%=%.tlpobj)

unpacked: $(CONTENTS:%=%.unpacked)