Merge pull request #16194 from miska/snort3-master
[feed/packages.git] / libs / librouteros / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=librouteros
9 PKG_SOURCE_DATE:=2018-07-19
10 PKG_SOURCE_VERSION:=c485c777ffbbbd87c3d72d843af36ba016803cae
11 PKG_RELEASE:=2
12
13 PKG_MAINTAINER:=Sven Roederer <devel-sven@geroedel.de>
14 PKG_LICENSE:=ISC
15 PKG_LICENSE_FILES:=COPYING
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
18 PKG_SOURCE_URL:=https://codeload.github.com/octo/librouteros/tar.gz/$(PKG_SOURCE_VERSION)?
19 PKG_HASH:=427e071fe270ff6c08e32a10e5beff2add4205e6c864b142f950efdb8d2245a4
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/librouteros
29 TITLE:=A library that talks to MikroTik devices.
30 URL:=https://octo.github.io/librouteros/
31 SECTION:=libs
32 CATEGORY:=Libraries
33 endef
34
35 define Package/librouteros/description
36 librouteros is a library to communicate with RouterOS, the operating system of MikroTik's RouterBoards.
37 It uses the API port provided by those systems to connect and talk to the devices. librouteros is a
38 low-level library in that it abstracts the network protocol used but has next to no knowledge about the
39 commands and responses available
40 endef
41
42 define Build/InstallDev
43 $(INSTALL_DIR) $(1)/usr/include
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/routeros_*.h $(1)/usr/include/
45 $(INSTALL_DIR) $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.{a,la,so*} $(1)/usr/lib/
47 endef
48
49 define Package/librouteros/install
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.so.* $(1)/usr/lib/
52 endef
53
54 $(eval $(call BuildPackage,librouteros))