libnetconf is a NETCONF library in C intended for building NETCONF clients and servers. It provides basic functions to connect NETCONF client and server to each other via SSH, to send and receive NETCONF messages and to store and work with the configuration data in a datastore.
Signed-off-by: Jiri Slachta <slac...@cesnet.cz> --- libs/libnetconf/Makefile | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 libs/libnetconf/Makefile diff --git a/libs/libnetconf/Makefile b/libs/libnetconf/Makefile new file mode 100644 index 0000000..c4cb3fc --- /dev/null +++ b/libs/libnetconf/Makefile @@ -0,0 +1,107 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnetconf +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 +PKG_REV:=ea32c191a189 +PKG_INSTALL:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://code.google.com/p/libnetconf/ +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME) + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/libnetconf + SECTION:=libs + CATEGORY:=Libraries + TITLE:=NETCONF library + URL:=$(PKG_SOURCE_URL) + DEPENDS:= \ + +libcurl \ + +libssh2 \ + +libxml2 \ + +libxslt \ + +LIBNETCONF_ENABLE_NOTIFICATIONS:libdbus + MAINTAINER:=Jiri Slachta <slac...@cesnet.cz> +endef + +define Package/libnetconf/description + libnetconf is the NETCONF library in C intended for building NETCONF clients and servers. + + libnetconf provides basic functions to connect NETCONF client and server to each other via + SSH, to send and receive NETCONF messages and to store and work with the configuration data + in a datastore. +endef + +define Package/$(PKG_NAME)/config +menu "Configuration" + config LIBNETCONF_ENABLE_NOTIFICATIONS + bool "Enable support of NETCONF Notifications (RFC 5277)" + default y + + config LIBNETCONF_ENABLE_URL + bool "Enable support of NETCONF URL Capability (RFC 6241)" + default y + + config LIBNETCONF_ENABLE_VALIDATION + bool "Enable support for configuration data validation" + default y + + config LIBNETCONF_NC_WORKING_DIR + depends on DEVEL + string "NETCONF working directory" + default /usr/share/libnetconf/nc-working-dir + help + Path to a working directory of libnetconf, where all + the system files are stored, the default value is + /usr/share/libnetconf/nc-working-dir +endmenu +endef + +ifeq ($(CONFIG_LIBNETCONF_NC_WORKING_DIR),) + CONFIG_LIBNETCONF_NC_WORKING_DIR:=/usr/share/libnetconf/nc-working-dir +endif + +CONFIGURE_ARGS+= \ + --prefix=/usr/ \ + --exec-prefix=/usr/ \ + --enable-libssh2 \ + $(if $(CONFIG_LIBNETCONF_ENABLE_NOTIFICATIONS),--enable,--disable)-notifications \ + $(if $(CONFIG_LIBNETCONF_ENABLE_URL),--enable,--disable)-url \ + $(if $(CONFIG_LIBNETCONF_ENABLE_VALIDATION),--enable,--disable)-validation \ + --with-ncworkingdirpath=$(CONFIG_LIBNETCONF_NC_WORKING_DIR) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf{,_ssh,_xml}*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/libnetconf + $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf/*.h $(1)/usr/include/libnetconf/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf.pc $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(1)/var/libnetconf +endef + +define Package/libnetconf/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/share/libnetconf/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/libnetconf/{rnglib,xslt} $(1)/usr/share/libnetconf/ + $(INSTALL_DIR) $(1)$(CONFIG_LIBNETCONF_NC_WORKING_DIR) +endef + +$(eval $(call BuildPackage,libnetconf)) -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel