diff --git a/projects/github.com/MaestroError/heif-converter-image/package.yml b/projects/github.com/MaestroError/heif-converter-image/package.yml new file mode 100644 index 00000000..6804d33d --- /dev/null +++ b/projects/github.com/MaestroError/heif-converter-image/package.yml @@ -0,0 +1,43 @@ +distributable: + url: https://github.com/MaestroError/heif-converter-image/archive/refs/tags/0.2.tar.gz + strip-components: 1 + +versions: + - 2023.6.23 + # FIXME once there has been an official release + # See https://github.com/orgs/teaxyz/discussions/321 + # github: MaestroError/heif-converter-image + # strip: /v/ + +provides: + - bin/heif-converter + +dependencies: + github.com/strukturag/libheif: "*" + +build: + dependencies: + go.dev: ^1.19 + script: | + go mod download + mkdir -p "{{ prefix }}"/bin + go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC . + env: + GOPROXY: https://proxy.golang.org,direct + GOSUMDB: sum.golang.org + GO111MODULE: on + CGO_ENABLED: 1 + BUILDLOC: "{{prefix}}/bin/heif-converter" + LDFLAGS: + - -s + - -w + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + +test: + script: + - which heif-converter + - heif-converter avif star-wars.avif star-wars.png diff --git a/projects/github.com/MaestroError/heif-converter-image/star-wars.avif b/projects/github.com/MaestroError/heif-converter-image/star-wars.avif new file mode 100644 index 00000000..1ad0b91d Binary files /dev/null and b/projects/github.com/MaestroError/heif-converter-image/star-wars.avif differ