Radix cross Linux

Radix Linux distribution for embedded systems.

637 Commits   4 Branches   3 Tags
author: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-19 07:08:54 +0000 committer: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-19 07:08:54 +0000 commit: da3ce28f494dfa162df8d722ec8af8af97db12ed parent: 1f83418228d9402a282f2120207a01adfcfaa1e9
Commit Summary:
The SSH library
Diffstat:
7 files changed, 462 insertions, 0 deletions
diff --git a/libs/libssh/0.7.3-x86_32/Makefile b/libs/libssh/0.7.3-x86_32/Makefile
new file mode 100644
index 000000000..f3b667bf0
--- /dev/null
+++ b/libs/libssh/0.7.3-x86_32/Makefile
@@ -0,0 +1,184 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC64)
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+CREATE_X86_32_PACKAGE = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/l/libssh
+
+REQUIRES           = libs/libssh/0.7.3
+REQUIRES          += net/openssl/1.0.2f-x86_32
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 0.7.3
+tar_xz_archive     = $(SRC_PACKAGE_PATH)/packages/l/libssh/libssh-$(version).tar.xz
+SRC_ARCHIVE        = $(tar_xz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/libssh-$(version)
+src_dir_name       = libssh-$(version)
+doc_dir_name       = libssh-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir          = $(TARGET_BUILD_DIR)/build
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+LIBSSH_32_PKG_NAME                = libssh-x32
+LIBSSH_32_PKG_VERSION             = 0.7.3
+LIBSSH_32_PKG_ARCH                = $(TOOLCHAIN)
+LIBSSH_32_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+LIBSSH_32_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+LIBSSH_32_PKG_GROUP               = $(PKG_GROUP)
+###                                |---handy-ruler-------------------------------|
+LIBSSH_32_PKG_SHORT_DESCRIPTION   = C implementation of SSH protocol
+LIBSSH_32_PKG_URL                 = $(BUG_URL)
+LIBSSH_32_PKG_LICENSE             = LGPLv2.1
+LIBSSH_32_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(LIBSSH_32_PKG_NAME)-pkg-description
+LIBSSH_32_PKG_DESCRIPTION_FILE_IN = $(LIBSSH_32_PKG_NAME)-pkg-description.in
+LIBSSH_32_PKG_INSTALL_SCRIPT      = $(LIBSSH_32_PKG_NAME)-pkg-install.sh
+
+LIBSSH_32_PKG    = $(CURDIR)/$(TARGET_BUILD_DIR)/$(LIBSSH_32_PKG_NAME)-package
+
+pkg_basename     = $(LIBSSH_32_PKG_NAME)-$(LIBSSH_32_PKG_VERSION)-$(LIBSSH_32_PKG_ARCH)-$(LIBSSH_32_PKG_DISTRO_NAME)-$(LIBSSH_32_PKG_DISTRO_VERSION)
+
+pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature    = $(call sign-name,$(pkg_archive))
+pkg_description  = $(call desc-name,$(pkg_archive))
+products         = $(call pkg-files,$(pkg_archive))
+
+
+BUILD_TARGETS    = $(build_target)
+BUILD_TARGETS   += $(install_target)
+
+PRODUCT_TARGETS  = $(products)
+
+ROOTFS_TARGETS   = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(LIBSSH_32_PKG)
+
+TARGET_BIN_RPATH = /lib$(MULTILIB_X86_32_SUFFIX):/usr/lib$(MULTILIB_X86_32_SUFFIX)
+TARGET_LIB_RPATH = /lib$(MULTILIB_X86_32_SUFFIX):/usr/lib$(MULTILIB_X86_32_SUFFIX):/usr/lib/../lib$(MULTILIB_X86_32_SUFFIX)
+
+configure_switches  = -DCMAKE_BUILD_TYPE='Release'
+
+configure_switches += -DCMAKE_C_COMPILER='$(CROSS_PREFIX)gcc'
+configure_switches += -DCMAKE_LINKER='$(CROSS_PREFIX)ld'
+configure_switches += -DCMAKE_AR='$(CROSS_PREFIX)ar'
+configure_switches += -DCMAKE_NM='$(CROSS_PREFIX)nm'
+configure_switches += -DCMAKE_RANLIB='$(CROSS_PREFIX)ranlib'
+configure_switches += -DCMAKE_OBJCOPY='$(CROSS_PREFIX)objcopy'
+configure_switches += -DCMAKE_OBJDUMP='$(CROSS_PREFIX)objdump'
+configure_switches += -DCMAKE_STRIP='$(CROSS_PREFIX)strip'
+
+configure_switches += -DCMAKE_C_FLAGS:STRING='--sysroot=$(TARGET_DEST_DIR) -m32 $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS)'
+
+configure_switches += -DCMAKE_EXE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 -Wl,-rpath,$(TARGET_BIN_RPATH) -L$(TARGET_DEST_DIR)/lib$(MULTILIB_X86_32_SUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)'
+configure_switches += -DCMAKE_MODULE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(MULTILIB_X86_32_SUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)'
+configure_switches += -DCMAKE_SHARED_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(MULTILIB_X86_32_SUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)'
+
+configure_switches += -DCMAKE_INSTALL_PREFIX=/usr
+
+configure_switches += -DMAN_INSTALL_DIR='/usr/share/man'
+configure_switches += -DLIB_INSTALL_DIR='/usr/lib$(MULTILIB_X86_32_SUFFIX)'
+configure_switches += -DLIB_SUFFIX:STRING='$(MULTILIB_X86_32_SUFFIX)'
+
+configure_switches += -DCMAKE_CROSSCOMPILING=True
+
+configure_switches += -DWITH_TESTING=OFF
+configure_switches += -DWITH_GSSAPI=OFF
+
+configure_switches += -DSHARE_INSTALL_PREFIX:PATH=/usr/share
+configure_switches += -DSYSCONF_INSTALL_DIR:PATH=/usr/etc
+configure_switches += -DWITH_EXAMPLES:BOOL=ON
+configure_switches += -DWITH_STATIC_LIB:BOOL=ON
+configure_switches += -DWITH_ZLIB:BOOL=ON
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@mkdir -p $(build_dir)
+	@( cd $(build_dir) ; \
+	   $(BUILD_ENVIRONMENT) cmake $(configure_switches) ../$(src_dir_name) ; \
+	 )
+	@( cd $(build_dir) ; \
+	   $(BUILD_ENVIRONMENT) $(MAKE) ; \
+	 )
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(LIBSSH_32_PKG)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	@rm -rf $(LIBSSH_32_PKG)/usr/include
+	@rm -rf $(LIBSSH_32_PKG)/usr/share
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(LIBSSH_32_PKG))
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libssh.pc libssh_threads.pc \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(LIBSSH_32_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+ifneq ($(CHRPATH),)
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(LIBSSH_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(LIBSSH_32_PKG_DESCRIPTION_FILE): $(LIBSSH_32_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(LIBSSH_32_PKG_DESCRIPTION_FILE) $(LIBSSH_32_PKG_INSTALL_SCRIPT)
+	@cp $(LIBSSH_32_PKG_DESCRIPTION_FILE) $(LIBSSH_32_PKG)/.DESCRIPTION
+	@cp $(LIBSSH_32_PKG_INSTALL_SCRIPT) $(LIBSSH_32_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(LIBSSH_32_PKG)/.REQUIRES
+	@echo "pkgname=$(LIBSSH_32_PKG_NAME)"                            >  $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(LIBSSH_32_PKG_VERSION)"                          >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "arch=$(LIBSSH_32_PKG_ARCH)"                               >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "distroname=$(LIBSSH_32_PKG_DISTRO_NAME)"                  >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "distrover=$(LIBSSH_32_PKG_DISTRO_VERSION)"                >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "group=$(LIBSSH_32_PKG_GROUP)"                             >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(LIBSSH_32_PKG_SHORT_DESCRIPTION)\"" >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "url=$(LIBSSH_32_PKG_URL)"                                 >> $(LIBSSH_32_PKG)/.PKGINFO ; \
+	 echo "license=$(LIBSSH_32_PKG_LICENSE)"                         >> $(LIBSSH_32_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(LIBSSH_32_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/libssh/0.7.3-x86_32/PATCHES b/libs/libssh/0.7.3-x86_32/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-description.in b/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-description.in
new file mode 100644
index 000000000..addb83d35
--- /dev/null
+++ b/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+          |-----handy-ruler------------------------------------------------------|
+libssh-x32: libssh-x32 @VERSION@ (x86_32 C implementation of SSH protocol)
+libssh-x32:
+libssh-x32: libssh is a mulitplatform C library implementing the SSHv2 and SSHv1
+libssh-x32: protocol on client and server side. With libssh, you can remotely
+libssh-x32: execute programs, transfer files, use a secure and transparent
+libssh-x32: tunnel, manage public keys and much more ...
+libssh-x32:
+libssh-x32:
+libssh-x32: Homepage: https://www.libssh.org
+libssh-x32:
+libssh-x32:
diff --git a/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-install.sh b/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-install.sh
new file mode 100755
index 000000000..8e8683cd6
--- /dev/null
+++ b/libs/libssh/0.7.3-x86_32/libssh-x32-pkg-install.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/libs/libssh/0.7.3/Makefile b/libs/libssh/0.7.3/Makefile
new file mode 100644
index 000000000..8cc673c62
--- /dev/null
+++ b/libs/libssh/0.7.3/Makefile
@@ -0,0 +1,235 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC32)
+COMPONENT_TARGETS += $(HARDWARE_PC64)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXQ)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BT1)
+
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/l/libssh
+
+REQUIRES          += net/openssl/1.0.2f
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 0.7.3
+tar_xz_archive     = $(SRC_PACKAGE_PATH)/packages/l/libssh/libssh-$(version).tar.xz
+SRC_ARCHIVE        = $(tar_xz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/libssh-$(version)
+src_dir_name       = libssh-$(version)
+doc_dir_name       = libssh-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir          = $(TARGET_BUILD_DIR)/build
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+LIBSSH_PKG_NAME                = libssh
+LIBSSH_PKG_VERSION             = 0.7.3
+LIBSSH_PKG_ARCH                = $(TOOLCHAIN)
+LIBSSH_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+LIBSSH_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+LIBSSH_PKG_GROUP               = $(PKG_GROUP)
+###                             |---handy-ruler-------------------------------|
+LIBSSH_PKG_SHORT_DESCRIPTION   = C implementation of SSH protocol
+LIBSSH_PKG_URL                 = $(BUG_URL)
+LIBSSH_PKG_LICENSE             = LGPLv2.1
+LIBSSH_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(LIBSSH_PKG_NAME)-pkg-description
+LIBSSH_PKG_DESCRIPTION_FILE_IN = $(LIBSSH_PKG_NAME)-pkg-description.in
+LIBSSH_PKG_INSTALL_SCRIPT      = $(LIBSSH_PKG_NAME)-pkg-install.sh
+
+LIBSSH_PKG       = $(CURDIR)/$(TARGET_BUILD_DIR)/$(LIBSSH_PKG_NAME)-package
+
+pkg_basename     = $(LIBSSH_PKG_NAME)-$(LIBSSH_PKG_VERSION)-$(LIBSSH_PKG_ARCH)-$(LIBSSH_PKG_DISTRO_NAME)-$(LIBSSH_PKG_DISTRO_VERSION)
+
+pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature    = $(call sign-name,$(pkg_archive))
+pkg_description  = $(call desc-name,$(pkg_archive))
+products         = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS    = $(build_target)
+BUILD_TARGETS   += $(install_target)
+
+PRODUCT_TARGETS  = $(products)
+
+ROOTFS_TARGETS   = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(LIBSSH_PKG)
+
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+configure_switches  = -DCMAKE_BUILD_TYPE='Release'
+
+configure_switches += -DCMAKE_C_COMPILER='$(CROSS_PREFIX)gcc'
+configure_switches += -DCMAKE_LINKER='$(CROSS_PREFIX)ld'
+configure_switches += -DCMAKE_AR='$(CROSS_PREFIX)ar'
+configure_switches += -DCMAKE_NM='$(CROSS_PREFIX)nm'
+configure_switches += -DCMAKE_RANLIB='$(CROSS_PREFIX)ranlib'
+configure_switches += -DCMAKE_OBJCOPY='$(CROSS_PREFIX)objcopy'
+configure_switches += -DCMAKE_OBJDUMP='$(CROSS_PREFIX)objdump'
+configure_switches += -DCMAKE_STRIP='$(CROSS_PREFIX)strip'
+
+configure_switches += -DCMAKE_C_FLAGS:STRING='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS)'
+
+configure_switches += -DCMAKE_EXE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -Wl,-rpath,$(TARGET_BIN_RPATH) -L$(TARGET_DEST_DIR)/lib$(LIBSUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) -lpthread'
+configure_switches += -DCMAKE_MODULE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(LIBSUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)'
+configure_switches += -DCMAKE_SHARED_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(LIBSUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)'
+
+
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_JZ47XX_GLIBC))
+configure_switches += -DCMAKE_C_FLAGS_RELEASE='-O2 -DNDEBUG'
+configure_switches += -DCMAKE_CXX_FLAGS_RELEASE='-O2 -DNDEBUG'
+configure_switches += -DCMAKE_ASM_FLAGS_RELEASE='-O2 -DNDEBUG'
+endif
+
+configure_switches += -DCMAKE_INSTALL_PREFIX=/usr
+
+configure_switches += -DMAN_INSTALL_DIR='/usr/share/man'
+configure_switches += -DLIB_INSTALL_DIR='/usr/lib$(LIBSUFFIX)'
+configure_switches += -DLIB_SUFFIX:STRING='$(LIBSUFFIX)'
+
+configure_switches += -DCMAKE_CROSSCOMPILING=True
+
+configure_switches += -DWITH_TESTING=OFF
+configure_switches += -DWITH_GSSAPI=OFF
+
+configure_switches += -DSHARE_INSTALL_PREFIX:PATH=/usr/share
+configure_switches += -DSYSCONF_INSTALL_DIR:PATH=/usr/etc
+configure_switches += -DWITH_EXAMPLES:BOOL=ON
+configure_switches += -DWITH_STATIC_LIB:BOOL=ON
+configure_switches += -DWITH_ZLIB:BOOL=ON
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@mkdir -p $(build_dir)
+	@( cd $(build_dir) ; \
+	   $(BUILD_ENVIRONMENT) cmake $(configure_switches) ../$(src_dir_name) ; \
+	 )
+	@( cd $(build_dir) ; \
+	   $(BUILD_ENVIRONMENT) $(MAKE) ; \
+	   $(BUILD_ENVIRONMENT) $(MAKE) -j1 doc ; \
+	 )
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(LIBSSH_PKG)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	# ======= Install Documentation =======
+	@mkdir -p $(LIBSSH_PKG)/usr/share/man/man3
+	@( cd $(build_dir)/doc/man/man3 ; \
+	   cp -a {b,d,e,l,s}*.3 $(LIBSSH_PKG)/usr/share/man/man3 ; \
+	 )
+	@if [ -d $(LIBSSH_PKG)/usr/share/man ]; then \
+	  ( cd $(LIBSSH_PKG)/usr/share/man ; \
+	    for manpagedir in `find . -type d -name "man*"` ; do \
+	      ( cd $$manpagedir ; \
+	        for eachpage in `find . -type l -maxdepth 1` ; do \
+	          ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+	          rm $$eachpage ; \
+	        done ; \
+	        gzip -9 *.?  ; \
+	      ) \
+	    done \
+	  ) \
+	 fi
+	@mkdir -p $(LIBSSH_PKG)/usr/doc/$(doc_dir_name)
+	@cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/BSD $(SRC_DIR)/COPYING \
+	       $(LIBSSH_PKG)/usr/doc/$(doc_dir_name)
+	@mkdir -p $(LIBSSH_PKG)/usr/share/doc/$(doc_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   cp -a AUTHORS BSD COPYING INSTALL README \
+	         $(LIBSSH_PKG)/usr/share/doc/$(doc_dir_name) \
+	 )
+	@cp -a $(build_dir)/doc/html $(LIBSSH_PKG)/usr/share/doc/$(doc_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   if [ -r ChangeLog -a -s ChangeLog ]; then \
+	     DOCSDIR=`echo $(LIBSSH_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+	     cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+	     touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+	   fi \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(LIBSSH_PKG))
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libssh.pc libssh_threads.pc \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(LIBSSH_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+ifneq ($(CHRPATH),)
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(LIBSSH_PKG)/usr/lib$(LIBSUFFIX) ; \
+	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(LIBSSH_PKG_DESCRIPTION_FILE): $(LIBSSH_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(LIBSSH_PKG_DESCRIPTION_FILE) $(LIBSSH_PKG_INSTALL_SCRIPT)
+	@cp $(LIBSSH_PKG_DESCRIPTION_FILE) $(LIBSSH_PKG)/.DESCRIPTION
+	@cp $(LIBSSH_PKG_INSTALL_SCRIPT) $(LIBSSH_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(LIBSSH_PKG)/.REQUIRES
+	@echo "pkgname=$(LIBSSH_PKG_NAME)"                            >  $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(LIBSSH_PKG_VERSION)"                          >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "arch=$(LIBSSH_PKG_ARCH)"                               >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "distroname=$(LIBSSH_PKG_DISTRO_NAME)"                  >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "distrover=$(LIBSSH_PKG_DISTRO_VERSION)"                >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "group=$(LIBSSH_PKG_GROUP)"                             >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(LIBSSH_PKG_SHORT_DESCRIPTION)\"" >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "url=$(LIBSSH_PKG_URL)"                                 >> $(LIBSSH_PKG)/.PKGINFO ; \
+	 echo "license=$(LIBSSH_PKG_LICENSE)"                         >> $(LIBSSH_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(LIBSSH_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/libssh/0.7.3/PATCHES b/libs/libssh/0.7.3/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/libssh/0.7.3/libssh-pkg-description.in b/libs/libssh/0.7.3/libssh-pkg-description.in
new file mode 100644
index 000000000..aa7b8987a
--- /dev/null
+++ b/libs/libssh/0.7.3/libssh-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+      |-----handy-ruler------------------------------------------------------|
+libssh: libssh @VERSION@ (C implementation of SSH protocol)
+libssh:
+libssh: libssh is a mulitplatform C library implementing the SSHv2 and SSHv1
+libssh: protocol on client and server side. With libssh, you can remotely
+libssh: execute programs, transfer files, use a secure and transparent
+libssh: tunnel, manage public keys and much more ...
+libssh:
+libssh:
+libssh: Homepage: https://www.libssh.org
+libssh:
+libssh:
diff --git a/libs/libssh/0.7.3/libssh-pkg-install.sh b/libs/libssh/0.7.3/libssh-pkg-install.sh
new file mode 100755
index 000000000..b44c4e648
--- /dev/null
+++ b/libs/libssh/0.7.3/libssh-pkg-install.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+  NEW="$1"
+  OLD="`dirname $NEW`/`basename $NEW .new`"
+  # If there's no file by that name, mv it over:
+  if [ ! -r $OLD ]; then
+    mv $NEW $OLD
+  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+    rm $NEW
+  fi
+  # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/sources/packages/l/libssh/Makefile b/sources/packages/l/libssh/Makefile
new file mode 100644
index 000000000..ef30152cd
--- /dev/null
+++ b/sources/packages/l/libssh/Makefile
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/l/libssh
+
+versions    = 0.7.3
+pkgname     = libssh
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)