You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.2 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=addrwatch
  9. PKG_VERSION:=1.0.2
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/fln/addrwatch/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=f04e143da881cd63c299125b592cfb85e4812abbd146f419a1894c00f2ae6208
  14. PKG_MAINTAINER:=Ondrej Caletka <ondrej@caletka.cz>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=USE_MUSL:argp-standalone
  20. PKG_FIXUP:=autoreconf
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/addrwatch/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=IPv4/IPv6 and ethernet address pairing tool
  26. URL:=https://github.com/fln/addrwatch
  27. endef
  28. define Package/addrwatch/Default/description
  29. This is a tool similar to arpwatch. It main purpose is to monitor network and
  30. log discovered ethernet/ip pairings. Addrwatch is extremely useful in networks
  31. with IPv6 autoconfiguration (RFC4862) enabled. It allows to track IPv6
  32. addresses of hosts using IPv6 privacy extensions (RFC4941).
  33. endef
  34. define Package/addrwatch
  35. $(call Package/addrwatch/Default)
  36. DEPENDS:=+libpcap +libevent2
  37. endef
  38. define Package/addrwatch/description
  39. $(call Package/addrwatch/Default/description)
  40. This contains the main addrwatch program.
  41. endef
  42. define Package/addrwatch-mysql
  43. $(call Package/addrwatch/Default)
  44. TITLE+= (MySQL output module)
  45. DEPENDS:=+addrwatch +libmariadb
  46. endef
  47. define Package/addrwatch-mysql/description
  48. $(call Package/addrwatch/Default/description)
  49. This contains the MySQL output module.
  50. endef
  51. define Package/addrwatch-stdout
  52. $(call Package/addrwatch/Default)
  53. TITLE+= (stdout output module)
  54. DEPENDS:=+addrwatch
  55. endef
  56. define Package/addrwatch-stdout/description
  57. $(call Package/addrwatch/Default/description)
  58. This contains the stdout output module.
  59. endef
  60. define Package/addrwatch-syslog
  61. $(call Package/addrwatch/Default)
  62. TITLE+= (syslog output module)
  63. DEPENDS:=+addrwatch
  64. endef
  65. define Package/addrwatch-syslog/description
  66. $(call Package/addrwatch/Default/description)
  67. This contains the syslog output module.
  68. endef
  69. define Package/addrwatch/conffiles
  70. /etc/config/addrwatch
  71. endef
  72. CONFIGURE_ARGS+= \
  73. --enable-mysql
  74. define Package/addrwatch/install
  75. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/addrwatch $(1)/usr/sbin/
  77. $(INSTALL_BIN) ./files/addrwatch.init $(1)/etc/init.d/addrwatch
  78. $(INSTALL_CONF) ./files/addrwatch.config $(1)/etc/config/addrwatch
  79. endef
  80. define Package/addrwatch-mysql/install
  81. $(INSTALL_DIR) $(1)/usr/sbin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/addrwatch_mysql $(1)/usr/sbin/
  83. endef
  84. define Package/addrwatch-stdout/install
  85. $(INSTALL_DIR) $(1)/usr/sbin
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/addrwatch_stdout $(1)/usr/sbin/
  87. endef
  88. define Package/addrwatch-syslog/install
  89. $(INSTALL_DIR) $(1)/usr/sbin
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/addrwatch_syslog $(1)/usr/sbin/
  91. endef
  92. $(eval $(call BuildPackage,addrwatch))
  93. $(eval $(call BuildPackage,addrwatch-mysql))
  94. $(eval $(call BuildPackage,addrwatch-stdout))
  95. $(eval $(call BuildPackage,addrwatch-syslog))