termux-packages/packages/go-findimagedupes/build.sh
Leonid Pliushch 4b8c077711
Revert "Merge pull request #7104 from thunder-coding/cache-godeps"
This reverts commit f6892c38d8, reversing
changes made to 4d9075fea3.
2021-07-10 17:00:18 +03:00

35 lines
1.3 KiB
Bash

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 Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=0.20190114
TERMUX_PKG_REVISION=9
_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
}