PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_VERSION:=0.4.3
+PKG_VERSION:=0.4.13
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=e7c821cde14df31a03d23293f84e0aed9cb1a457
-PKG_MIRROR_HASH:=88a4c06e9cdb81879de7311138acbfe9fe5207db14fbb93c5ba4d6947d616aec
+PKG_SOURCE_VERSION:=ae560bef2e70d274f6d028b59e3cb398ea2a621d
+PKG_MIRROR_HASH:=43b7f9c436afc76de539a7426b1462249326318b9b836f1d49282106a730a6b8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/CESNET/Netopeer2.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-DCMAKE_BUILD_TYPE:STRING=Release \
-DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys
-define Build/Configure
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server)
- $(call Build/Configure/Default)
-
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli)
- $(call Build/Configure/Default)
-
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored)
- $(call Build/Configure/Default)
-endef
-
-define Build/Compile
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server)
- $(call Build/Compile/Default)
-
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli)
- $(call Build/Compile/Default)
-
- $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored)
- $(call Build/Compile/Default)
-endef
-
define Package/netopeer2-server/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/
$(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server
$(INSTALL_BIN) $(PKG_BUILD_ROOT)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
$(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang
+ $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
$(INSTALL_DIR) $(1)/etc/uci-defaults
# Warning, problems can occur if the device restarts in the middle of this uci-default script
if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore\ ")
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore.yang -o root:root -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
if [ -x /bin/sysrepocfg ]; then
sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
rm /usr/share/netopeer2-keystored/stock_key_config.xml
# Warning, problems can occur if the device restarts in the middle of this uci-default script
if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore\ ")
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore.yang -o root:root -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
if [ -x /bin/sysrepocfg ]; then
sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
rm /usr/share/netopeer2-keystored/stock_key_config.xml
# Warning, problems can occur if the device restarts in the middle of this uci-default script
if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-ssh-server\ ")
+ match=$(sysrepoctl -l | grep "ietf-ssh-server ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server.yang -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
fi
- match=$(sysrepoctl -l | grep "ietf-tls-server\ ")
+ match=$(sysrepoctl -l | grep "ietf-tls-server ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server.yang -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
fi
- match=$(sysrepoctl -l | grep "iana-crypt-hash\ ")
+ match=$(sysrepoctl -l | grep "iana-crypt-hash ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash.yang -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
fi
- match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name\ ")
+ match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name.yang -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
fi
- match=$(sysrepoctl -l | grep "ietf-netconf-server\ ")
+ match=$(sysrepoctl -l | grep "ietf-netconf-server ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server.yang -o root:root -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
sysrepoctl -m ietf-netconf-server -e listen
sysrepoctl -m ietf-netconf-server -e ssh-listen
if [ -x /bin/sysrepocfg ]; then
fi
fi
- match=$(sysrepoctl -l | grep "ietf-system\ ")
+ match=$(sysrepoctl -l | grep "ietf-system ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system.yang -o root:root -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
sysrepoctl -m ietf-system -e authentication
sysrepoctl -m ietf-system -e local-users
fi
--- /dev/null
+Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+@@ -0,0 +1,5 @@
++cmake_minimum_required(VERSION 2.6)
++
++add_subdirectory(server)
++add_subdirectory(cli)
++add_subdirectory(keystored)
+Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+===================================================================
+--- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
++++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-cli C)
+ include(GNUInstallDirs)
+@@ -83,7 +83,7 @@ endif()
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
+ # clean cmake cache
+-add_custom_target(cleancache
++add_custom_target(cleancache_cli
+ COMMAND make clean
+ COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
+ COMMAND rm -rf Makefile Doxyfile
+Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+===================================================================
+--- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
++++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(keystored C)
+ include(GNUInstallDirs)
+Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+===================================================================
+--- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
++++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.9)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-server C)
+ include(GNUInstallDirs)