diff options
Diffstat (limited to 'src/libssh2.mk')
-rw-r--r-- | src/libssh2.mk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/libssh2.mk b/src/libssh2.mk new file mode 100644 index 0000000..e7e10e8 --- /dev/null +++ b/src/libssh2.mk @@ -0,0 +1,37 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# libssh2 +PKG := libssh2 +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.4.0 +$(PKG)_CHECKSUM := 53428b4935ab6eb843d45f1593dc434cb287b93e +$(PKG)_SUBDIR := libssh2-$($(PKG)_VERSION) +$(PKG)_FILE := libssh2-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://www.libssh2.org +$(PKG)_URL := http://www.libssh2.org/download/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libgcrypt zlib + +define $(PKG)_UPDATE + wget -q -O- 'http://www.libssh2.org/download/?C=M;O=D' | \ + grep 'libssh2-' | \ + $(SED) -n 's,.*libssh2-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --disable-shared \ + --prefix='$(PREFIX)/$(TARGET)' \ + --without-openssl \ + --with-libgcrypt \ + PKG_CONFIG='$(TARGET)-pkg-config' \ + LIBS="-lgcrypt `$(PREFIX)/$(TARGET)/bin/gpg-error-config --libs`" + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= html_DATA= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libssh2.exe' \ + `'$(TARGET)-pkg-config' --cflags --libs libssh2` +endef |