2 # Copyright (C) 2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 # Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
10 include $(TOPDIR
)/rules.mk
14 PKG_LICENSE
:=BSD-3-Clause
15 PKG_MAINTAINER
:=Mislav Novakovic
<mislav.novakovic@sartura.hr
>
20 PKG_SOURCE_VERSION
:=3b99e99c9d507ddc89d21d7f1cbded494e6aa72e
21 PKG_MIRROR_HASH
:=d29b501d56bf9a2480759cc55368c842f69b07722afb3a0a70f05d6088f72574
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.xz
23 PKG_SOURCE_URL
:=https
://github.com
/CESNET
/Netopeer2.git
24 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
)
26 PKG_BUILD_ROOT
:=$(BUILD_DIR
)/$(PKG_SOURCE_SUBDIR
)
27 PKG_BUILD_DIR
:=$(PKG_BUILD_ROOT
)
34 include $(INCLUDE_DIR
)/package.mk
35 include $(INCLUDE_DIR
)/cmake.mk
37 define Package
/netopeer2-keystored
/config
38 source
"$(SOURCE)/Config_keystored.in"
41 define Package
/netopeer2-server
45 URL
:=$(PKG_SOURCE_URL
)
46 DEPENDS
:=+libpthread
+libyang
+libnetconf2
+netopeer2-keystored
+libsysrepo
+sysrepocfg
+sysrepoctl
+sysrepo
50 define Package
/netopeer2-cli
53 TITLE
:=Netopeer2 cli tool
54 URL
:=$(PKG_SOURCE_URL
)
55 DEPENDS
:=+libpthread
+libyang
+libnetconf2
+libopenssl
58 define Package
/netopeer2-keystored
61 TITLE
:=Netopeer2 key store management
62 URL
:=$(PKG_SOURCE_URL
)
63 DEPENDS
:=+libopenssl
+libsysrepo
+sysrepo
+sysrepocfg
+sysrepoctl
+SSH_KEYS
:openssh-keygen
+SSH_KEYS
:openssl-util
67 define Package
/netopeer2
/description
68 Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
69 Protocol. This is the second generation of the toolset
, originally available
as the Netopeer
70 project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries
-
71 libyang and libnetconf2. The Netopeer server uses sysrepo
as a NETCONF datastore implementation.
75 -DCMAKE_INSTALL_PREFIX
:PATH
=/usr \
76 -DCMAKE_BUILD_TYPE
:STRING
=Release \
77 -DKEYSTORED_KEYS_DIR
:STRING
=/etc
/keystored
/keys
79 define Package
/netopeer2-server
/install
80 $(INSTALL_DIR
) $(1)/bin
81 $(INSTALL_BIN
) $(PKG_BUILD_ROOT
)/server
/netopeer2-server
$(1)/bin
/
83 $(INSTALL_DIR
) $(1)/etc
/sysrepo
/yang
84 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-ssh-server.yang
$(1)/etc
/sysrepo
/yang
/ietf-ssh-server@
2016-11-02.yang
85 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-tls-server.yang
$(1)/etc
/sysrepo
/yang
/ietf-tls-server@
2016-11-02.yang
86 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/iana-crypt-hash.yang
$(1)/etc
/sysrepo
/yang
/iana-crypt-hash@
2014-08-06.yang
87 $(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
88 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-netconf-server.yang
$(1)/etc
/sysrepo
/yang
/ietf-netconf-server@
2016-11-02.yang
89 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-netconf-monitoring.yang
$(1)/etc
/sysrepo
/yang
/ietf-netconf-monitoring@
2010-10-04.yang
90 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-netconf-with-defaults.yang
$(1)/etc
/sysrepo
/yang
/ietf-netconf-with-defaults@
2011-06-01.yang
91 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-system.yang
$(1)/etc
/sysrepo
/yang
/ietf-system@
2014-08-06.yang
93 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
94 $(INSTALL_BIN
) .
/files
/netopeer2-server.default
$(1)/etc
/uci-defaults
/99_netopeer2-server
96 $(INSTALL_DIR
) $(1)/etc
/init.d
/
97 $(INSTALL_BIN
) .
/files
/netopeer2-server.init
$(1)/etc
/init.d
/netopeer2-server
99 $(INSTALL_DIR
) $(1)/usr
/share
/netopeer2-server
100 $(INSTALL_DATA
) .
/files
/stock_config.xml
$(1)/usr
/share
/netopeer2-server
103 define Package
/netopeer2-cli
/install
104 $(INSTALL_DIR
) $(1)/bin
105 $(INSTALL_BIN
) $(PKG_BUILD_ROOT
)/cli
/netopeer2-cli
$(1)/bin
/
108 define Package
/netopeer2-keystored
/install
109 $(INSTALL_DIR
) $(1)/usr
/lib
/sysrepo
/plugins
/
110 $(INSTALL_BIN
) $(PKG_BUILD_ROOT
)/keystored
/libkeystored.so
$(1)/usr
/lib
/sysrepo
/plugins
/
112 $(INSTALL_DIR
) $(1)/etc
/sysrepo
/yang
113 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/modules
/ietf-keystore.yang
$(1)/etc
/sysrepo
/yang
/ietf-keystore@
2016-10-31.yang
115 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
117 $(INSTALL_DIR
) $(1)/etc
/keystored
/keys
118 ifeq ($(CONFIG_SSH_KEYS
),y
)
119 $(INSTALL_BIN
) .
/files
/netopeer2-keystored-keygen.default
$(1)/etc
/uci-defaults
/97_netopeer2-keystored
121 $(INSTALL_BIN
) .
/files
/netopeer2-keystored.default
$(1)/etc
/uci-defaults
/97_netopeer2-keystored
122 #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself.
123 $(INSTALL_DATA
) .
/files
/ssh_host_rsa_key.pem
$(1)/etc
/keystored
/keys
124 $(INSTALL_DATA
) .
/files
/ssh_host_rsa_key.pub.pem
$(1)/etc
/keystored
/keys
127 $(INSTALL_DIR
) $(1)/usr
/share
/netopeer2-keystored
128 $(INSTALL_DATA
) $(PKG_BUILD_ROOT
)/keystored
/stock_key_config.xml
$(1)/usr
/share
/netopeer2-keystored
131 $(eval
$(call BuildPackage
,netopeer2-server
))
132 $(eval
$(call BuildPackage
,netopeer2-cli
))
133 $(eval
$(call BuildPackage
,netopeer2-keystored
))