diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5978028..d1043ce 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -68,6 +68,13 @@ jobs: REPO="${{ github.repository }}" API="https://kjgr.io/api/v1/repos/${REPO}/releases" + # Delete existing release for this tag (handles re-tags/re-runs) + EXISTING=$(curl -s "$API/tags/$TAG" -H "Authorization: token $GITEA_TOKEN" | jq -r '.id // empty') + if [ -n "$EXISTING" ] && [ "$EXISTING" != "null" ]; then + echo "Deleting existing release $EXISTING for tag $TAG" + curl -s -X DELETE "$API/$EXISTING" -H "Authorization: token $GITEA_TOKEN" + fi + RELEASE=$(curl -s -X POST "$API" \ -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: application/json" \ diff --git a/Makefile b/Makefile index b324675..297b81d 100644 --- a/Makefile +++ b/Makefile @@ -14,42 +14,53 @@ FPC ?= fpc TARGET = libechomail.so SOURCE = echomail.pp PLATFORM ?= linux-x86_64 -VERSION = 0.0.4 +VERSION = 0.0.5 # ---- fpcup paths ---- FPCUP = /opt/fpcup FPCSRC = $(FPCUP)/fpcsrc/packages +FPCUNITS = $(FPCUP)/fpc/units -FPCFLAGS = -Mobjfpc -Sh -CX -XXs -O2 -fPIC \ +# Common flags (all platforms) +FPCFLAGS = -Mobjfpc -Sh -CX -XXs -O2 \ -Fubuild -FUbuild \ - -Fu. \ - -Fu/tmp/paszlib_fpic \ - -Fu$(FPCSRC)/fcl-json/src \ - -Fu$(FPCSRC)/fcl-base/src \ - -Fu$(FPCSRC)/fcl-base/src/unix \ - -Fu$(FPCSRC)/fcl-extra/src \ - -Fu$(FPCSRC)/fcl-extra/src/unix \ - -Fu$(FPCSRC)/fcl-net/src \ - -Fu$(FPCSRC)/fcl-net/src/unix \ - -Fu$(FPCSRC)/fcl-process/src \ - -Fu$(FPCSRC)/fcl-process/src/unix \ - -Fi$(FPCSRC)/fcl-process/src/unix \ - -Fi$(FPCSRC)/fcl-base/src/unix \ - -Fi$(FPCSRC)/fcl-extra/src/unix \ - -Fi$(FPCSRC)/fcl-net/src/unix \ - -o$(TARGET) + -Fu. + +ifeq ($(PLATFORM),linux-x86_64) + # Native Linux: compile FCL from source with -fPIC for .so linking + FPCFLAGS += -fPIC \ + -Fu/tmp/paszlib_fpic \ + -Fu$(FPCSRC)/fcl-json/src \ + -Fu$(FPCSRC)/fcl-base/src \ + -Fu$(FPCSRC)/fcl-base/src/unix \ + -Fu$(FPCSRC)/fcl-extra/src \ + -Fu$(FPCSRC)/fcl-extra/src/unix \ + -Fu$(FPCSRC)/fcl-net/src \ + -Fu$(FPCSRC)/fcl-net/src/unix \ + -Fu$(FPCSRC)/fcl-process/src \ + -Fu$(FPCSRC)/fcl-process/src/unix \ + -Fi$(FPCSRC)/fcl-process/src/unix \ + -Fi$(FPCSRC)/fcl-base/src/unix \ + -Fi$(FPCSRC)/fcl-extra/src/unix \ + -Fi$(FPCSRC)/fcl-net/src/unix +endif ifeq ($(PLATFORM),freebsd-x86_64) FPC = ppcrossx64 - FPCFLAGS += -Tfreebsd + TARGET = libechomail.so + FPCFLAGS += -Tfreebsd \ + -Fu$(FPCUNITS)/x86_64-freebsd/* endif ifeq ($(PLATFORM),win64) FPC = ppcrossx64 TARGET = echomail.dll - FPCFLAGS += -Twin64 -o$(TARGET) + FPCFLAGS += -Twin64 \ + -Fu$(FPCUNITS)/x86_64-win64/* endif +FPCFLAGS += -o$(TARGET) + INSTALL_DIR ?= ../../Fastway-Server/src/plugins .PHONY: all clean install package diff --git a/echomail.pp b/echomail.pp index 7f9daf4..eabf850 100644 --- a/echomail.pp +++ b/echomail.pp @@ -13,7 +13,7 @@ uses fw_fido_outbound; const - ECHOMAIL_VERSION = '0.0.4'; + ECHOMAIL_VERSION = '0.0.5'; type TEchomailPlugin = class; diff --git a/plugin.json b/plugin.json index cde763f..2536af5 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "echomail", - "version": "0.0.4", + "version": "0.0.5", "api_version": 1, "description": "Echomail Processor - Tosser, scanner, packer, AreaFix, netmail routing", "short_description": "FidoNet echomail tosser and scanner (like FastEcho/Squish)",