diff options
author | Robert Alessi <alessi@robertalessi.net> | 2024-02-25 18:38:07 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2024-02-25 18:38:07 +0100 |
commit | 7d3df0f8bb89c237e20a151257e75f920eda551b (patch) | |
tree | 2f2ccfacc18d26e29fc72a2c9f3ed96f0a3188f3 | |
parent | 7d2db957b4813111e3454540a579b57d23898a02 (diff) | |
download | texlive-openbsd-7d3df0f8bb89c237e20a151257e75f920eda551b.tar.gz |
added makefile
-rw-r--r-- | makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..28dce7f --- /dev/null +++ b/makefile | |||
@@ -0,0 +1,34 @@ | |||
1 | PREFIX?=/usr/local/texlive/2024/bin/custom | ||
2 | BINREPO=https://www.ekdosis.org/texlive | ||
3 | TMPDIR!=mktemp -d | ||
4 | OPENBSD_VERSION!=uname -r | sed 's/\.//' | ||
5 | TLBINPATH!=which latex | sed 's/\/latex//' | ||
6 | TMPSOURCE?="" | ||
7 | |||
8 | .MAIN: fetch | ||
9 | |||
10 | fetch: | ||
11 | curl ${BINREPO}/amd64-openbsd${OPENBSD_VERSION}.tar.xz \ | ||
12 | > ${TMPDIR}/amd64-openbsd${OPENBSD_VERSION}.tar.xz | ||
13 | curl ${BINREPO}/amd64-openbsd${OPENBSD_VERSION}.tar.xz.asc \ | ||
14 | > ${TMPDIR}/amd64-openbsd${OPENBSD_VERSION}.tar.xz.asc | ||
15 | gpg --verify ${TMPDIR}/amd64-openbsd${OPENBSD_VERSION}.tar.xz.asc | ||
16 | .if "${PREFIX}" == ${TLBINPATH} | ||
17 | @echo "Looks good." | ||
18 | @echo "Now do this to install or update the binaries:" | ||
19 | @echo "1. Remove the binaries that are currently installed:" | ||
20 | @echo " doas rm ${PREFIX}/*" | ||
21 | @echo "2. Run this command:" | ||
22 | @echo " make TMPSOURCE=${TMPDIR} install" | ||
23 | .else | ||
24 | @echo "Looks like your TL binaries are in ${TLBINPATH}" | ||
25 | @echo "instead of ${PREFIX}" | ||
26 | @echo "To complete the update, you must replace by hand your binaries" | ||
27 | @echo "with those in ${TMPDIR}/amd64-openbsd${OPENBSD_VERSION}.tar.xz" | ||
28 | .endif | ||
29 | |||
30 | install: | ||
31 | unxz ${TMPSOURCE}/amd64-openbsd${OPENBSD_VERSION}.tar.xz | ||
32 | doas tar xf ${TMPSOURCE}/amd64-openbsd${OPENBSD_VERSION}.tar -C ${PREFIX}/ | ||
33 | |||
34 | .PHONY: fetch install | ||