diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ad75051..5a185ad 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -40,7 +40,7 @@ jobs: archive="${PWD}/archive.tar.gz" cd "${{ gitea.workspace }}/clash" mkdir usr/ - make PREFIX="usr/" deploy-install + make PREFIX="usr/" REAL_PREFIX="/usr/" deploy-install tar -caf "${archive}" usr/ - name: Upload Artifacts uses: actions/upload-artifact@v3 diff --git a/clash/Makefile b/clash/Makefile index 0b22c9a..20166c9 100644 --- a/clash/Makefile +++ b/clash/Makefile @@ -1,6 +1,7 @@ LISP=sbcl -PREFIX=~/.local +PREFIX=${HOME}/.local +REAL_PREFIX=$(PREFIX) override SRCS=clash.asd format.lisp parse-date.lisp clash.lisp override LOAD_CLASH=--eval "(ql:quickload '(:cl-ppcre :clingon :local-time :uiop :trivial-features :osicat))" \ @@ -43,7 +44,7 @@ $(DEPLOY_OUTPUT): $(SRCS) deploy-install: deploy-build clash.1 mkdir -p "$(PREFIX)/lib/clash/" cp $(DEPLOY_OUTPUT) "$(PREFIX)/lib/clash/" - ln -sf "/$(PREFIX)/lib/clash/clash" "$(PREFIX)/bin/clash" + ln -sf "$(REAL_PREFIX)/lib/clash/clash" "$(PREFIX)/bin/clash" mkdir -p "$(PREFIX)/share/man/man1/" cp clash.1 "$(PREFIX)/share/man/man1/"