mirror of
https://github.com/talgo-cloud/talgo-libwebp.git
synced 2026-03-07 13:38:17 -08:00
The upstream harukasan/go-libwebp hasn't been updated in almost three years, so we're officially forking this into tidbyt/go-libwebp and making it a Go module.
42 lines
927 B
Makefile
42 lines
927 B
Makefile
repo = github.com/tidbyt/go-libwebp
|
|
build_dir = /tmp
|
|
cur_dir = $(shell pwd)
|
|
libwebp_so = ${LIBWEBP_PREFIX}/lib/libwebp.so
|
|
LIBWEBP_VERSION ?= 0.5.1
|
|
|
|
all: test
|
|
|
|
test:
|
|
go test -v $(repo)/...
|
|
|
|
libwebp: $(libwebp_so)
|
|
|
|
$(libwebp_so):
|
|
cd $(build_dir) \
|
|
&& wget http://downloads.webmproject.org/releases/webp/libwebp-$(LIBWEBP_VERSION).tar.gz \
|
|
&& tar xf libwebp-$(LIBWEBP_VERSION).tar.gz \
|
|
&& cd libwebp-$(LIBWEBP_VERSION) \
|
|
&& ./configure --prefix=$(LIBWEBP_PREFIX) --enable-libwebpmux \
|
|
&& make \
|
|
&& make install
|
|
|
|
docker-test:
|
|
docker run -v $(cur_dir):/go/src/$(repo) -it go-libwebp:$(LIBWEBP_VERSION)
|
|
|
|
docker-sh:
|
|
docker run -v $(cur_dir):/go/src/$(repo) -it go-libwebp:$(LIBWEBP_VERSION) sh
|
|
|
|
docker-build:
|
|
docker build -t go-libwebp:$(LIBWEBP_VERSION) .
|
|
|
|
docker-clean:
|
|
docker rm $$(docker ps -a -q -f "ancestor=go-libwebp")
|
|
|
|
.PHONY: \
|
|
all \
|
|
test \
|
|
libwebp \
|
|
docker-test \
|
|
docker-sh \
|
|
docker-build \
|
|
docker-clean
|