Radix cross Linux

Radix Linux distribution for embedded systems.

637 Commits   4 Branches   3 Tags
author: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-13 15:15:58 +0000 committer: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-13 15:15:58 +0000 commit: f10724fe29db79f52f36eae07acd07aef0e2110d parent: d02c886e5120aa25165ff7a7bb9ef2e2ec2b660e
Commit Summary:
NTP daemon, netCDF library
Diffstat:
22 files changed, 1043 insertions, 0 deletions
diff --git a/base/radix-system/etc/rc.d/rc.K b/base/radix-system/etc/rc.d/rc.K
index 3deaf5cc8..d84597425 100644
--- a/base/radix-system/etc/rc.d/rc.K
+++ b/base/radix-system/etc/rc.d/rc.K
@@ -161,6 +161,11 @@ if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit
   . /etc/rc.d/rc.acpid stop
 fi
 
+# Terminate ntpd before syslog:
+if [ -x /etc/rc.d/rc.ntpd -a -r /var/run/ntpd.pid ]; then # quit
+  sh /etc/rc.d/rc.ntpd stop
+fi
+
 # Kill all processes.
 echo
 echo "Sending all processes the SIGHUP signal."
diff --git a/libs/netcdf/4.4.1-x86_32/Makefile b/libs/netcdf/4.4.1-x86_32/Makefile
new file mode 100644
index 000000000..bac84cdb6
--- /dev/null
+++ b/libs/netcdf/4.4.1-x86_32/Makefile
@@ -0,0 +1,208 @@
+
+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/unidata/netcdf-c
+
+REQUIRES           = libs/netcdf/4.4.1
+REQUIRES          += net/curl/7.47.0-x86_32
+REQUIRES          += net/openssl/1.0.2f-x86_32
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 4.4.1
+tar_gz_archive     = $(SRC_PACKAGE_PATH)/packages/l/unidata/netcdf-c/netcdf-$(version).tar.gz
+SRC_ARCHIVE        = $(tar_gz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/netcdf-$(version)
+src_dir_name       = netcdf-$(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.
+#
+NETCDF_32_PKG_NAME                = netcdf-x32
+NETCDF_32_PKG_VERSION             = 4.4.1
+NETCDF_32_PKG_ARCH                = $(TOOLCHAIN)
+NETCDF_32_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+NETCDF_32_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+NETCDF_32_PKG_GROUP               = $(PKG_GROUP)
+###                                |---handy-ruler-------------------------------|
+NETCDF_32_PKG_SHORT_DESCRIPTION   = network Common Data Form
+NETCDF_32_PKG_URL                 = $(BUG_URL)
+NETCDF_32_PKG_LICENSE             = custom
+NETCDF_32_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(NETCDF_32_PKG_NAME)-pkg-description
+NETCDF_32_PKG_DESCRIPTION_FILE_IN = $(NETCDF_32_PKG_NAME)-pkg-description.in
+NETCDF_32_PKG_INSTALL_SCRIPT      = $(NETCDF_32_PKG_NAME)-pkg-install.sh
+
+NETCDF_32_PKG     = $(CURDIR)/$(TARGET_BUILD_DIR)/$(NETCDF_32_PKG_NAME)-package
+
+pkg_basename      = $(NETCDF_32_PKG_NAME)-$(NETCDF_32_PKG_VERSION)-$(NETCDF_32_PKG_ARCH)-$(NETCDF_32_PKG_DISTRO_NAME)-$(NETCDF_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=$(NETCDF_32_PKG)
+
+
+extra_configure_switches  = --libdir=/usr/lib$(MULTILIB_X86_32_SUFFIX)
+extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --bindir=/usr/bin/32
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --enable-dap-netcdf
+extra_configure_switches += --enable-mmap
+extra_configure_switches += --enable-jna
+
+extra_configure_switches += --enable-netcdf-4=no
+extra_configure_switches += --enable-hdf4=no
+extra_configure_switches += --enable-parallel-tests=no
+extra_configure_switches += --enable-valgrind-tests=no
+extra_configure_switches += --enable-extra-tests=no
+
+extra_configure_switches += --enable-large-file-tests=no
+extra_configure_switches += --enable-benchmarks=no
+
+extra_configure_switches += --enable-shared=yes
+extra_configure_switches += --enable-static=yes
+
+
+####### 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) ../$(src_dir_name)/configure \
+	  --prefix=/usr               \
+	  --build=$(BUILD)            \
+	  --host=$(TARGET32)          \
+	  $(extra_configure_switches)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(NETCDF_32_PKG)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	@rm  -f $(NETCDF_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libnetcdf.settings
+	@rm -rf $(NETCDF_32_PKG)/usr/include
+	@rm -rf $(NETCDF_32_PKG)/usr/share
+	# ======= remove toolchain path from target libtool *.la files =======
+	@( cd $(NETCDF_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   sed -i "s,$(TARGET_DEST_DIR),,g" libnetcdf.la  \
+	 )
+	# ======= tune nc-config prefix to the target destination for development =======
+	@( cd $(NETCDF_32_PKG)/usr/bin/32 ; \
+	   sed -i "s,prefix=/usr,prefix=$(TARGET_DEST_DIR)/usr,g" nc-config ; \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(NETCDF_32_PKG))
+	# ======= tune libtool *.la search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libnetcdf.la ; \
+	   sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libnetcdf.la \
+	 )
+	# ======= 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,prefix=/usr,prefix=$(TARGET_DEST_DIR)/usr,g" netcdf.pc ; \
+	   sed -i "s,libdir=/usr,libdir=$(TARGET_DEST_DIR)/usr,g" netcdf.pc ; \
+	 )
+	# ======= tune pkg-config *.pc search path to the target machine =======
+	@( cd $(NETCDF_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig ; \
+	   sed -i "s,^\(ccompiler=\).*,\1/usr/bin/gcc -m32,g" netcdf.pc ; \
+	 )
+	# ======= tune nc-config prefix to the target machine =======
+	@( cd $(NETCDF_32_PKG)/usr/bin/32 ; \
+	   sed -i "s,prefix=$(TARGET_DEST_DIR)/usr,prefix=/usr,g" nc-config ; \
+	   sed -i "s,^\(cc=\).*,\1\"/usr/bin/gcc -m32\",g"        nc-config ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(NETCDF_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 binaries =======
+	@( cd $(NETCDF_32_PKG)/usr/bin/32 ; \
+	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH" | cut -f2 -d'='` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       rpath=`echo $$rpath | sed "s,$(TARGET_DEST_DIR),,g"` ; \
+	       $(CHRPATH) -r $$rpath $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(NETCDF_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" | cut -f2 -d'='` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       rpath=`echo $$rpath | sed "s,$(TARGET_DEST_DIR),,g"` ; \
+	       $(CHRPATH) -r $$rpath $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(NETCDF_32_PKG_DESCRIPTION_FILE): $(NETCDF_32_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(NETCDF_32_PKG_DESCRIPTION_FILE) $(NETCDF_32_PKG_INSTALL_SCRIPT)
+	@cp $(NETCDF_32_PKG_DESCRIPTION_FILE) $(NETCDF_32_PKG)/.DESCRIPTION
+	@cp $(NETCDF_32_PKG_INSTALL_SCRIPT) $(NETCDF_32_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(NETCDF_32_PKG)/.REQUIRES
+	@echo "pkgname=$(NETCDF_32_PKG_NAME)"                            >  $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(NETCDF_32_PKG_VERSION)"                          >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "arch=$(NETCDF_32_PKG_ARCH)"                               >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "distroname=$(NETCDF_32_PKG_DISTRO_NAME)"                  >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "distrover=$(NETCDF_32_PKG_DISTRO_VERSION)"                >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "group=$(NETCDF_32_PKG_GROUP)"                             >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(NETCDF_32_PKG_SHORT_DESCRIPTION)\"" >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "url=$(NETCDF_32_PKG_URL)"                                 >> $(NETCDF_32_PKG)/.PKGINFO ; \
+	 echo "license=$(NETCDF_32_PKG_LICENSE)"                         >> $(NETCDF_32_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(NETCDF_32_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/netcdf/4.4.1-x86_32/PATCHES b/libs/netcdf/4.4.1-x86_32/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/netcdf/4.4.1-x86_32/netcdf-x32-pkg-description.in b/libs/netcdf/4.4.1-x86_32/netcdf-x32-pkg-description.in
new file mode 100644
index 000000000..467159a78
--- /dev/null
+++ b/libs/netcdf/4.4.1-x86_32/netcdf-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------------------------------------------------------|
+netcdf-x32: netcdf-x32 @VERSION@ (x86_32 network Common Data Form)
+netcdf-x32:
+netcdf-x32: NetCDF (network Common Data Form) is a set of software libraries
+netcdf-x32: and machine-independent data formats that support the creation,
+netcdf-x32: access, and sharing of array-oriented scientific data.
+netcdf-x32: This package is provided for C.
+netcdf-x32:
+netcdf-x32:
+netcdf-x32: Homepage: http://www.unidata.ucar.edu/software/netcdf
+netcdf-x32:
+netcdf-x32:
diff --git a/libs/netcdf/4.4.1-x86_32/netcdf-x32-pkg-install.sh b/libs/netcdf/4.4.1-x86_32/netcdf-x32-pkg-install.sh
new file mode 100755
index 000000000..8e8683cd6
--- /dev/null
+++ b/libs/netcdf/4.4.1-x86_32/netcdf-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/netcdf/4.4.1/Makefile b/libs/netcdf/4.4.1/Makefile
new file mode 100644
index 000000000..53e6ce569
--- /dev/null
+++ b/libs/netcdf/4.4.1/Makefile
@@ -0,0 +1,243 @@
+
+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/unidata/netcdf-c
+
+REQUIRES           = net/curl/7.47.0
+REQUIRES          += net/openssl/1.0.2f
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 4.4.1
+tar_gz_archive     = $(SRC_PACKAGE_PATH)/packages/l/unidata/netcdf-c/netcdf-$(version).tar.gz
+SRC_ARCHIVE        = $(tar_gz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/netcdf-$(version)
+src_dir_name       = netcdf-$(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.
+#
+NETCDF_PKG_NAME                = netcdf
+NETCDF_PKG_VERSION             = 4.4.1
+NETCDF_PKG_ARCH                = $(TOOLCHAIN)
+NETCDF_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+NETCDF_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+NETCDF_PKG_GROUP               = $(PKG_GROUP)
+###                             |---handy-ruler-------------------------------|
+NETCDF_PKG_SHORT_DESCRIPTION   = network Common Data Form
+NETCDF_PKG_URL                 = $(BUG_URL)
+NETCDF_PKG_LICENSE             = custom
+NETCDF_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(NETCDF_PKG_NAME)-pkg-description
+NETCDF_PKG_DESCRIPTION_FILE_IN = $(NETCDF_PKG_NAME)-pkg-description.in
+NETCDF_PKG_INSTALL_SCRIPT      = $(NETCDF_PKG_NAME)-pkg-install.sh
+
+NETCDF_PKG       = $(CURDIR)/$(TARGET_BUILD_DIR)/$(NETCDF_PKG_NAME)-package
+
+pkg_basename     = $(NETCDF_PKG_NAME)-$(NETCDF_PKG_VERSION)-$(NETCDF_PKG_ARCH)-$(NETCDF_PKG_DISTRO_NAME)-$(NETCDF_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=$(NETCDF_PKG)
+
+
+extra_configure_switches  = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --enable-dap-netcdf
+extra_configure_switches += --enable-mmap
+extra_configure_switches += --enable-jna
+
+extra_configure_switches += --enable-netcdf-4=no
+extra_configure_switches += --enable-hdf4=no
+extra_configure_switches += --enable-parallel-tests=no
+extra_configure_switches += --enable-valgrind-tests=no
+extra_configure_switches += --enable-extra-tests=no
+
+extra_configure_switches += --enable-large-file-tests=no
+extra_configure_switches += --enable-benchmarks=no
+
+extra_configure_switches += --enable-shared=yes
+extra_configure_switches += --enable-static=yes
+
+
+####### 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) ../$(src_dir_name)/configure \
+	  --prefix=/usr               \
+	  --build=$(BUILD)            \
+	  --host=$(TARGET)            \
+	  $(extra_configure_switches)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(NETCDF_PKG)
+	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	@rm -f $(NETCDF_PKG)/usr/lib$(LIBSUFFIX)/libnetcdf.settings
+	# ======= Install Documentation =======
+	@if [ -d $(NETCDF_PKG)/usr/share/man ]; then \
+	  ( cd $(NETCDF_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 $(NETCDF_PKG)/usr/doc/$(src_dir_name)
+	@cp -a $(SRC_DIR)/COPYRIGHT \
+	       $(NETCDF_PKG)/usr/doc/$(src_dir_name)
+	@mkdir -p $(NETCDF_PKG)/usr/share/doc/$(src_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   cp -a COPYRIGHT INSTALL.md README.md \
+	         $(NETCDF_PKG)/usr/share/doc/$(src_dir_name) \
+	 )
+	@( cd $(SRC_DIR) ; \
+	   if [ -r ChangeLog ]; then \
+	     DOCSDIR=`echo $(NETCDF_PKG)/usr/share/doc/$(src_dir_name)` ; \
+	     cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+	     touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+	   fi \
+	 )
+	# ======= remove toolchain path from target libtool *.la files =======
+	@( cd $(NETCDF_PKG)/usr/lib$(LIBSUFFIX) ; \
+	   sed -i "s,$(TARGET_DEST_DIR),,g" libnetcdf.la ; \
+	 )
+	# ======= tune nc-config prefix to the target destination for development =======
+	@( cd $(NETCDF_PKG)/usr/bin ; \
+	   sed -i "s,prefix=/usr,prefix=$(TARGET_DEST_DIR)/usr,g" nc-config ; \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(NETCDF_PKG))
+	# ======= tune libtool *.la search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libnetcdf.la ; \
+	   sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libnetcdf.la \
+	 )
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+	   sed -i "s,prefix=/usr,prefix=$(TARGET_DEST_DIR)/usr,g" netcdf.pc ; \
+	   sed -i "s,libdir=/usr,libdir=$(TARGET_DEST_DIR)/usr,g" netcdf.pc ; \
+	 )
+	# ======= tune pkg-config *.pc search path to the target machine =======
+	@( cd $(NETCDF_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+	   sed -i "s,^\(ccompiler=\).*,\1/usr/bin/gcc,g" netcdf.pc ; \
+	 )
+	# ======= tune nc-config prefix to the target machine =======
+	@( cd $(NETCDF_PKG)/usr/bin ; \
+	   sed -i "s,prefix=$(TARGET_DEST_DIR)/usr,prefix=/usr,g" nc-config ; \
+	   sed -i "s,^\(cc=\).*,\1\"/usr/bin/gcc\",g"             nc-config ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(NETCDF_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 binaries =======
+	@( cd $(NETCDF_PKG)/usr/bin ; \
+	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH" | cut -f2 -d'='` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       rpath=`echo $$rpath | sed "s,$(TARGET_DEST_DIR),,g"` ; \
+	       $(CHRPATH) -r $$rpath $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(NETCDF_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" | cut -f2 -d'='` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       rpath=`echo $$rpath | sed "s,$(TARGET_DEST_DIR),,g"` ; \
+	       $(CHRPATH) -r $$rpath $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(NETCDF_PKG_DESCRIPTION_FILE): $(NETCDF_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(NETCDF_PKG_DESCRIPTION_FILE) $(NETCDF_PKG_INSTALL_SCRIPT)
+	@cp $(NETCDF_PKG_DESCRIPTION_FILE) $(NETCDF_PKG)/.DESCRIPTION
+	@cp $(NETCDF_PKG_INSTALL_SCRIPT) $(NETCDF_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(NETCDF_PKG)/.REQUIRES
+	@echo "pkgname=$(NETCDF_PKG_NAME)"                            >  $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(NETCDF_PKG_VERSION)"                          >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "arch=$(NETCDF_PKG_ARCH)"                               >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "distroname=$(NETCDF_PKG_DISTRO_NAME)"                  >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "distrover=$(NETCDF_PKG_DISTRO_VERSION)"                >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "group=$(NETCDF_PKG_GROUP)"                             >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(NETCDF_PKG_SHORT_DESCRIPTION)\"" >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "url=$(NETCDF_PKG_URL)"                                 >> $(NETCDF_PKG)/.PKGINFO ; \
+	 echo "license=$(NETCDF_PKG_LICENSE)"                         >> $(NETCDF_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(NETCDF_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/netcdf/4.4.1/PATCHES b/libs/netcdf/4.4.1/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/netcdf/4.4.1/netcdf-pkg-description.in b/libs/netcdf/4.4.1/netcdf-pkg-description.in
new file mode 100644
index 000000000..2b6955a69
--- /dev/null
+++ b/libs/netcdf/4.4.1/netcdf-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------------------------------------------------------|
+netcdf: netcdf @VERSION@ (network Common Data Form)
+netcdf:
+netcdf: NetCDF (network Common Data Form) is a set of software libraries
+netcdf: and machine-independent data formats that support the creation,
+netcdf: access, and sharing of array-oriented scientific data.
+netcdf: This package is provided for C.
+netcdf:
+netcdf:
+netcdf: Homepage: http://www.unidata.ucar.edu/software/netcdf
+netcdf:
+netcdf:
diff --git a/libs/netcdf/4.4.1/netcdf-pkg-install.sh b/libs/netcdf/4.4.1/netcdf-pkg-install.sh
new file mode 100755
index 000000000..8e8683cd6
--- /dev/null
+++ b/libs/netcdf/4.4.1/netcdf-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/net/ntp/4.2.8p8/Makefile b/net/ntp/4.2.8p8/Makefile
new file mode 100644
index 000000000..216561769
--- /dev/null
+++ b/net/ntp/4.2.8p8/Makefile
@@ -0,0 +1,295 @@
+
+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/n/ntp
+
+REQUIRES           = secure/libcap/2.25
+REQUIRES          += net/openssl/1.0.2f
+REQUIRES          += net/net-snmp/5.7.3
+REQUIRES          += net/net-snmp/5.7.3
+REQUIRES          += net/libnl3/3.2.27
+REQUIRES          += libs/libevent/2.0.22
+REQUIRES          += app/lm_sensors/3.4.0
+REQUIRES          += dev/perl/5.22.1
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 4.2.8p8
+tar_gz_archive     = $(SRC_PACKAGE_PATH)/packages/n/ntp/ntp-$(version).tar.gz
+SRC_ARCHIVE        = $(tar_gz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/ntp-$(version)
+src_dir_name       = ntp-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+conf_dir           = $(CURDIR)/etc
+
+
+PATCHES = PATCHES
+
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = net
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+NTP_PKG_NAME                = ntp
+NTP_PKG_VERSION             = 4.2.8p8
+NTP_PKG_ARCH                = $(TOOLCHAIN)
+NTP_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+NTP_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+NTP_PKG_GROUP               = $(PKG_GROUP)
+###                          |---handy-ruler-------------------------------|
+NTP_PKG_SHORT_DESCRIPTION   = Network Time Protocol daemon
+NTP_PKG_URL                 = $(BUG_URL)
+NTP_PKG_LICENSE             = custom
+NTP_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(NTP_PKG_NAME)-pkg-description
+NTP_PKG_DESCRIPTION_FILE_IN = $(NTP_PKG_NAME)-pkg-description.in
+NTP_PKG_INSTALL_SCRIPT      = $(NTP_PKG_NAME)-pkg-install.sh
+
+NTP_PKG          = $(CURDIR)/$(TARGET_BUILD_DIR)/$(NTP_PKG_NAME)-package
+
+pkg_basename     = $(NTP_PKG_NAME)-$(NTP_PKG_VERSION)-$(NTP_PKG_ARCH)-$(NTP_PKG_DISTRO_NAME)-$(NTP_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=$(NTP_PKG)
+
+
+extra_configure_switches  = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --htmldir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --bindir=/usr/sbin
+extra_configure_switches += --sbindir=/usr/sbin
+
+extra_configure_switches += --enable-linuxcaps
+extra_configure_switches += --enable-ntp-signd
+
+extra_configure_switches += --with-yielding-select=yes
+
+extra_configure_switches += --enable-ipv6
+extra_configure_switches += --with-crypto
+
+extra_configure_switches += --with-net-snmp-config=$(TARGET_DEST_DIR)/usr/bin/net-snmp-config
+
+extra_configure_switches += --program-prefix=
+extra_configure_switches += --program-suffix=
+
+
+#
+# Global Variables:
+# ================
+#   ARCH        - defined in dev/perl/5.22.1/Makefile
+#
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC32)),)
+ARCH            = x86_32
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC64)),)
+ARCH            = x86_64
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_CB1X)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_CB2X) $(HARDWARE_CB3X)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_FFRK3288)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_M201)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_MXQ)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_NIT6Q)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_OMAP5UEVM) $(HARDWARE_DRA7XXEVM)),)
+ARCH            = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_CI20)),)
+ARCH            = mips32r2
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_BT1)),)
+ARCH            = mips32r5
+endif
+
+ARCHNAME = $(ARCH)-linux
+
+
+CFLAGS += -Wno-strict-overflow
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) ./configure \
+	  --prefix=/usr               \
+	  --build=$(BUILD)            \
+	  --host=$(TARGET)            \
+	  $(extra_configure_switches)
+	# ======= Add extra Perl5 CPP, LD flags =======
+	@( cd $(SRC_DIR) ; \
+	   for file in `find . -name "Makefile"` ; do \
+	     if [ -n "`cat $$file | grep SNMP_LIBS`" ] ; then \
+	       sed -i "s,^\(SNMP_CPPFLAGS =.*\),\1 -I$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/perl5/arm-linux/CORE," $$file ; \
+	       sed -i "s#^\(SNMP_LIBS =.*/usr/lib$(LIBSUFFIX) \)#\1-Wl,-E -Wl,-rpath,/usr/lib$(LIBSUFFIX)/perl5/$(ARCHNAME)/CORE #" $$file ; \
+	     fi ; \
+	   done ; \
+	 )
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(NTP_PKG)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	# ======= remove empty && unneeded dirs =======
+	@rm -rf $(NTP_PKG)/usr/share/man/man8
+	@rm -rf $(NTP_PKG)/usr/libexec
+	# ======= Install the initial ntpd config files and scripts =======
+	@mkdir -p $(NTP_PKG)/etc/{ntp,rc.d}
+	@cp -a $(conf_dir)/ntp.conf     $(NTP_PKG)/etc/ntp.conf.new
+	@cp -a $(conf_dir)/ntp/ntp.keys $(NTP_PKG)/etc/ntp/ntp.keys.new
+	@chmod 600 $(NTP_PKG)/etc/ntp/ntp.keys.new
+	@cat $(conf_dir)/rc.d/rc.ntpd > $(NTP_PKG)/etc/rc.d/rc.ntpd.new
+	@chmod 644 $(NTP_PKG)/etc/rc.d/rc.ntpd.new
+	@touch $(NTP_PKG)/etc/ntp/step-tickers
+	# ======= Install Documentation =======
+	@if [ -d $(NTP_PKG)/usr/share/man ]; then \
+	  ( cd $(NTP_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 $(NTP_PKG)/usr/doc/$(src_dir_name)
+	@cp -a $(SRC_DIR)/COPYRIGHT \
+	       $(NTP_PKG)/usr/doc/$(src_dir_name)
+	@mkdir -p $(NTP_PKG)/usr/share/doc/$(src_dir_name)/{util,ntpdate}
+	@( cd $(SRC_DIR) ; \
+	   cp -a COPYRIGHT NEWS README* TODO WHERE-TO-START *.y2kfixes \
+	         $(NTP_PKG)/usr/share/doc/$(src_dir_name) ; \
+	   cp -a util/README    $(NTP_PKG)/usr/share/doc/$(src_dir_name)/util    ; \
+	   cp -a ntpdate/README $(NTP_PKG)/usr/share/doc/$(src_dir_name)/ntpdate ; \
+	 )
+	@mkdir -p $(NTP_PKG)/usr/share/doc/$(src_dir_name)/{clockstuff,scripts}
+	@( cd $(SRC_DIR) ; \
+	   cp -a clockstuff/README clockstuff/propdelay \
+	         $(NTP_PKG)/usr/share/doc/$(src_dir_name)/clockstuff ; \
+	   cp -a conf \
+	         $(NTP_PKG)/usr/share/doc/$(src_dir_name) ; \
+	 )
+	@( cd $(SRC_DIR)/scripts ; \
+	   cp -a stats rc monitoring \
+	         $(NTP_PKG)/usr/share/doc/$(src_dir_name)/scripts ; \
+	 )
+	@mkdir -p $(NTP_PKG)/usr/share/doc/$(src_dir_name)/scripts/ntpsweep
+	@( cd $(SRC_DIR)/scripts/ntpsweep ; \
+	   cp -a ntpsweep ntpsweep.{1,html} \
+	         $(NTP_PKG)/usr/share/doc/$(src_dir_name)/scripts/ntpsweep ; \
+	 )
+	@( cd $(SRC_DIR) ; \
+	   if [ -r ChangeLog ]; then \
+	     DOCSDIR=`echo $(NTP_PKG)/usr/share/doc/$(src_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, $(NTP_PKG))
+	# ======= Strip binaries =======
+	@( cd $(NTP_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	 )
+ifneq ($(CHRPATH),)
+	# ======= Set RPATH/RUNPATH for target binaries =======
+	@( cd $(NTP_PKG)/usr/sbin ; \
+	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH" | cut -f2 -d'='` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       rpath=`echo $$rpath | sed "s,$(TARGET_DEST_DIR),,g"` ; \
+	       $(CHRPATH) -r $$rpath $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(NTP_PKG_DESCRIPTION_FILE): $(NTP_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(NTP_PKG_DESCRIPTION_FILE) $(NTP_PKG_INSTALL_SCRIPT)
+	@cp $(NTP_PKG_DESCRIPTION_FILE) $(NTP_PKG)/.DESCRIPTION
+	@cp $(NTP_PKG_INSTALL_SCRIPT) $(NTP_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(NTP_PKG)/.REQUIRES
+	@echo "pkgname=$(NTP_PKG_NAME)"                            >  $(NTP_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(NTP_PKG_VERSION)"                          >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "arch=$(NTP_PKG_ARCH)"                               >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "distroname=$(NTP_PKG_DISTRO_NAME)"                  >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "distrover=$(NTP_PKG_DISTRO_VERSION)"                >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "group=$(NTP_PKG_GROUP)"                             >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(NTP_PKG_SHORT_DESCRIPTION)\"" >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "url=$(NTP_PKG_URL)"                                 >> $(NTP_PKG)/.PKGINFO ; \
+	 echo "license=$(NTP_PKG_LICENSE)"                         >> $(NTP_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(NTP_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/net/ntp/4.2.8p8/PATCHES b/net/ntp/4.2.8p8/PATCHES
new file mode 100644
index 000000000..654a9c9bf
--- /dev/null
+++ b/net/ntp/4.2.8p8/PATCHES
@@ -0,0 +1,2 @@
+
+../../../sources/packages/n/ntp/patches/ntp-4.2.8p8-nano.patch -p0
diff --git a/net/ntp/4.2.8p8/etc/ntp.conf b/net/ntp/4.2.8p8/etc/ntp.conf
new file mode 100644
index 000000000..1844fb91c
--- /dev/null
+++ b/net/ntp/4.2.8p8/etc/ntp.conf
@@ -0,0 +1,72 @@
+# Sample /etc/ntp.conf:  Configuration file for ntpd.
+#
+# Undisciplined Local Clock. This is a fake driver intended for backup
+# and when no outside source of synchronized time is available. The
+# default stratum is usually 3, but in this case we elect to use stratum
+# 0. Since the server line does not have the prefer keyword, this driver
+# is never used for synchronization, unless no other other
+# synchronization source is available. In case the local host is
+# controlled by some external source, such as an external oscillator or
+# another protocol, the prefer keyword would cause the local host to
+# disregard all other synchronization sources, unless the kernel
+# modifications are in use and declare an unsynchronized condition.
+#
+server	127.127.1.0	# local clock
+fudge	127.127.1.0 stratum 10	
+
+#
+# NTP server (list one or more) to synchronize with:
+#server 0.pool.ntp.org iburst
+#server 1.pool.ntp.org iburst
+#server 2.pool.ntp.org iburst
+#server 3.pool.ntp.org iburst
+
+#
+# Drift file.  Put this in a directory which the daemon can write to.
+# No symbolic links allowed, either, since the daemon updates the file
+# by creating a temporary in the same directory and then rename()'ing
+# it to the file.
+#
+driftfile /etc/ntp/drift
+
+#
+# Uncomment to use a multicast NTP server on the local subnet:
+#multicastclient 224.0.1.1		# listen on default 224.0.1.1
+# Set an optional compensation for broadcast packet delay:
+#broadcastdelay	0.008
+
+#
+# Keys file.  If you want to diddle your server at run time, make a
+# keys file (mode 600 for sure) and define the key number to be
+# used for making requests.
+# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
+# systems might be able to reset your clock at will.
+#
+#keys		/etc/ntp/keys
+#trustedkey	65535
+#requestkey	65535
+#controlkey	65535
+
+#
+# Don't serve time or stats to anyone else by default (more secure)
+restrict default limited kod nomodify notrap nopeer noquery
+restrict -6 default limited kod nomodify notrap nopeer noquery
+
+#
+# Use these lines instead if you do want to serve time and stats to
+# other machines on the network:
+#restrict default limited kod nomodify notrap nopeer
+#restrict -6 default limited kod nomodify notrap nopeer
+
+#
+# Disable the ntpdc -c monlist command, which is insecure and can be used
+# to cause a denial of service attack (CVE-2013-5211). Future versions of
+# NTP will remove this command.
+# (this feature was disabled by default with ntpd 4.2.7p230)
+disable monitor
+
+#
+# Trust ourselves.  :-)
+restrict 127.0.0.1
+restrict ::1
+
diff --git a/net/ntp/4.2.8p8/etc/ntp/ntp.keys b/net/ntp/4.2.8p8/etc/ntp/ntp.keys
new file mode 100644
index 000000000..1c3fbd2c4
--- /dev/null
+++ b/net/ntp/4.2.8p8/etc/ntp/ntp.keys
@@ -0,0 +1,2 @@
+65535	M	akey
+1	M	pass
diff --git a/net/ntp/4.2.8p8/etc/rc.d/rc.ntpd b/net/ntp/4.2.8p8/etc/rc.d/rc.ntpd
new file mode 100644
index 000000000..7cf3d50b0
--- /dev/null
+++ b/net/ntp/4.2.8p8/etc/rc.d/rc.ntpd
@@ -0,0 +1,56 @@
+#!/bin/sh
+# Start/stop/restart ntpd.
+
+# Start ntpd:
+ntpd_start() {
+  CMDLINE="/usr/sbin/ntpd -g"
+  echo -n "Starting NTP daemon:  $CMDLINE"
+  $CMDLINE -p /var/run/ntpd.pid
+  echo
+}
+
+# Stop ntpd:
+ntpd_stop() {
+  echo -n "Stopping NTP daemon..."
+  if [ -r /var/run/ntpd.pid ]; then
+    kill -HUP $(cat /var/run/ntpd.pid)
+    rm -f /var/run/ntpd.pid
+  else
+    killall -HUP -q ntpd
+  fi
+  echo
+}
+
+# Restart ntpd:
+ntpd_restart() {
+  ntpd_stop
+  sleep 1
+  ntpd_start
+}
+
+# Check if ntpd is running
+ntpd_status() {
+  if [ -e /var/run/ntpd.pid ]; then
+    echo "ntpd is running."
+  else 
+    echo "ntpd is stopped."
+    exit 1
+  fi
+}
+
+case "$1" in
+'start')
+  ntpd_start
+  ;;
+'stop')
+  ntpd_stop
+  ;;
+'restart')
+  ntpd_restart
+  ;;
+'status')
+  ntpd_status
+  ;;
+*)
+  echo "usage $0 start|stop|restart|status"
+esac
diff --git a/net/ntp/4.2.8p8/ntp-pkg-description.in b/net/ntp/4.2.8p8/ntp-pkg-description.in
new file mode 100644
index 000000000..8d1f93bf0
--- /dev/null
+++ b/net/ntp/4.2.8p8/ntp-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------------------------------------------------------|
+ntp: ntp @VERSION@ (Network Time Protocol daemon)
+ntp:
+ntp: The Network Time Protocol (NTP) is used to synchronize the time
+ntp: of a computer client or server to another server or reference time
+ntp: source, such as a radio or satellite receiver or modem. It provides
+ntp: client accuracies typically within a millisecond on LANs and up to
+ntp: a few tens of milliseconds on WANs relative to a primary server
+ntp: synchronized to Coordinated Universal Time (UTC) via a Global
+ntp: Positioning Service (GPS) receiver, for example. 
+ntp:
+ntp:
diff --git a/net/ntp/4.2.8p8/ntp-pkg-install.sh b/net/ntp/4.2.8p8/ntp-pkg-install.sh
new file mode 100755
index 000000000..f31063d6a
--- /dev/null
+++ b/net/ntp/4.2.8p8/ntp-pkg-install.sh
@@ -0,0 +1,66 @@
+#!/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...
+}
+
+preserve_perms() {
+  NEW="$1"
+  OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+  if [ -e ${OLD} ]; then
+    cp -a ${OLD} ${NEW}.incoming
+    cat ${NEW} > ${NEW}.incoming
+    mv ${NEW}.incoming ${NEW}
+  fi
+  install_file ${NEW}
+}
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  preserve_perms etc/rc.d/rc.ntpd.new
+  install_file   etc/ntp.conf.new
+  install_file   etc/ntp/ntp.keys.new
+}
+
+# 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/products/X11/Makefile b/products/X11/Makefile
index ce8fdf7e1..d02ea000a 100644
--- a/products/X11/Makefile
+++ b/products/X11/Makefile
@@ -636,6 +636,9 @@ ifeq ($(HARDWARE),$(HARDWARE_PC64))
 REQUIRES += net/avahi-daemon/0.6.31-x86_32
 endif
 
+REQUIRES += net/ntp/4.2.8p8
+
+
 REQUIRES += app/mc/4.8.16
 REQUIRES += app/tmux/2.0
 REQUIRES += app/chrpath/0.16
diff --git a/products/base/Makefile b/products/base/Makefile
index c69a195c3..f1f70817f 100644
--- a/products/base/Makefile
+++ b/products/base/Makefile
@@ -636,6 +636,9 @@ ifeq ($(HARDWARE),$(HARDWARE_PC64))
 REQUIRES += net/avahi-daemon/0.6.31-x86_32
 endif
 
+REQUIRES += net/ntp/4.2.8p8
+
+
 REQUIRES += app/mc/4.8.16
 REQUIRES += app/tmux/2.0
 REQUIRES += app/chrpath/0.16
diff --git a/sources/packages/l/unidata/Makefile b/sources/packages/l/unidata/Makefile
new file mode 100644
index 000000000..78f51bc23
--- /dev/null
+++ b/sources/packages/l/unidata/Makefile
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
diff --git a/sources/packages/l/unidata/netcdf-c/Makefile b/sources/packages/l/unidata/netcdf-c/Makefile
new file mode 100644
index 000000000..557722c61
--- /dev/null
+++ b/sources/packages/l/unidata/netcdf-c/Makefile
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/l/unidata/netcdf-c
+
+versions    = 4.4.1
+pkgname     = netcdf
+suffix      = tar.gz
+
+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)
diff --git a/sources/packages/n/ntp/Makefile b/sources/packages/n/ntp/Makefile
new file mode 100644
index 000000000..b40c5369b
--- /dev/null
+++ b/sources/packages/n/ntp/Makefile
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/n/ntp
+
+versions    = 4.2.8p8
+pkgname     = ntp
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/ntp-4.2.8p8-nano.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+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
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-4.2.8p8-nano-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
diff --git a/sources/packages/n/ntp/create-4.2.8p8-nano-patch/create.patch.sh b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/create.patch.sh
new file mode 100755
index 000000000..f52ba755b
--- /dev/null
+++ b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/create.patch.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=4.2.8p8
+
+tar --files-from=file.list -xzvf ../ntp-$VERSION.tar.gz
+mv ntp-$VERSION ntp-$VERSION-orig
+
+cp -rf ./ntp-$VERSION-new ./ntp-$VERSION
+
+diff -b --unified -Nr  ntp-$VERSION-orig  ntp-$VERSION > ntp-$VERSION-nano.patch
+
+mv ntp-$VERSION-nano.patch ../patches
+
+rm -rf ./ntp-$VERSION
+rm -rf ./ntp-$VERSION-orig
diff --git a/sources/packages/n/ntp/create-4.2.8p8-nano-patch/file.list b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/file.list
new file mode 100644
index 000000000..f312251a9
--- /dev/null
+++ b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/file.list
@@ -0,0 +1 @@
+ntp-4.2.8p8/include/ntp_syscall.h
diff --git a/sources/packages/n/ntp/create-4.2.8p8-nano-patch/ntp-4.2.8p8-new/include/ntp_syscall.h b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/ntp-4.2.8p8-new/include/ntp_syscall.h
new file mode 100644
index 000000000..9e184323e
--- /dev/null
+++ b/sources/packages/n/ntp/create-4.2.8p8-nano-patch/ntp-4.2.8p8-new/include/ntp_syscall.h
@@ -0,0 +1,64 @@
+/*
+ * ntp_syscall.h - various ways to perform the ntp_adjtime() and ntp_gettime()
+ * 		   system calls.
+ */
+
+#ifndef NTP_SYSCALL_H
+#define NTP_SYSCALL_H
+
+#ifdef HAVE_SYS_TIMEX_H
+# include <sys/timex.h>
+#endif
+
+#if defined(ADJ_NANO) && !defined(MOD_NANO)
+#define MOD_NANO ADJ_NANO
+#endif
+
+#if defined(ADJ_TAI) && !defined(MOD_TAI)
+#define MOD_TAI ADJ_TAI
+#endif
+
+#ifndef NTP_SYSCALLS_LIBC
+# ifdef NTP_SYSCALLS_STD
+#  define ntp_adjtime(t)	syscall(SYS_ntp_adjtime, (t))
+#  define ntp_gettime(t)	syscall(SYS_ntp_gettime, (t))
+# else /* !NTP_SYSCALLS_STD */
+#  ifdef HAVE_NTP_ADJTIME
+extern	int	ntp_adjtime	(struct timex *);
+
+#   ifndef HAVE_STRUCT_NTPTIMEVAL
+struct ntptimeval
+{
+	struct timeval	time;		/* current time (ro) */
+	long int	maxerror;	/* maximum error (us) (ro) */
+	long int	esterror;	/* estimated error (us) (ro) */
+};
+#   endif
+
+#   ifndef HAVE_NTP_GETTIME
+static inline int
+ntp_gettime(
+	struct ntptimeval *ntv
+	)
+{
+	struct timex tntx;
+	int result;
+
+	ZERO(tntx);
+	result = ntp_adjtime(&tntx);
+	ntv->time = tntx.time;
+	ntv->maxerror = tntx.maxerror;
+	ntv->esterror = tntx.esterror;
+#    ifdef NTP_API
+#     if NTP_API > 3
+	ntv->tai = tntx.tai;
+#     endif
+#    endif
+	return result;
+}
+#   endif	/* !HAVE_NTP_GETTIME */
+#  endif	/* !HAVE_NTP_ADJTIME */
+# endif	/* !NTP_SYSCALLS_STD */
+#endif	/* !NTP_SYSCALLS_LIBC */
+
+#endif	/* NTP_SYSCALL_H */