From e06e8926d4967ecf6be0e4f618821e5c90211371 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Mon, 18 Nov 2019 16:26:54 +0200 Subject: [PATCH] move from unstable: go-findimagedupes --- packages/go-findimagedupes/build.sh | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packages/go-findimagedupes/build.sh diff --git a/packages/go-findimagedupes/build.sh b/packages/go-findimagedupes/build.sh new file mode 100644 index 000000000..58f277d01 --- /dev/null +++ b/packages/go-findimagedupes/build.sh @@ -0,0 +1,34 @@ +TERMUX_PKG_HOMEPAGE=https://gitlab.com/opennota/findimagedupes +TERMUX_PKG_DESCRIPTION="Find visually similar or duplicate images" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="Leonid Plyushch " +TERMUX_PKG_VERSION=0.20190114 +TERMUX_PKG_REVISION=8 +_COMMIT=237ed2ef4bbb91c79eee0f5ee84a1adad9c014ff +TERMUX_PKG_SRCURL=https://gitlab.com/opennota/findimagedupes/-/archive/${_COMMIT}/findimagedupes-${_COMMIT}.tar.gz +TERMUX_PKG_SHA256=7eb4fbab38c8c1965dafd1d0fddbfac58ba6e1a3d52cd1220df488a0a338abb0 +TERMUX_PKG_DEPENDS="file, libjpeg-turbo, libpng, libtiff" +TERMUX_PKG_CONFLICTS="findimagedupes" +TERMUX_PKG_REPLACES="findimagedupes" + +termux_step_make() { + termux_setup_golang + + export GOPATH=$TERMUX_PKG_BUILDDIR + export CGO_CFLAGS="$CFLAGS $CPPFLAGS -I$TERMUX_PREFIX/include/libpng16 -D__GLIBC__" + export CGO_CXXFLAGS="$CXXFLAGS $CPPFLAGS -I$TERMUX_PREFIX/include/libpng16 -D__GLIBC__" + export CGO_LDFLAGS="$LDFLAGS" + + mkdir -p "$GOPATH"/src/gitlab.com/opennota + ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/gitlab.com/opennota/findimagedupes + + cd "$GOPATH"/src/gitlab.com/opennota/findimagedupes + + go build . +} + +termux_step_make_install() { + install -Dm700 \ + "$GOPATH"/src/gitlab.com/opennota/findimagedupes/findimagedupes \ + "$TERMUX_PREFIX"/bin/findimagedupes +}