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.

75 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2015 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:=libnet
  9. PKG_VERSION:=1.2-rc3
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/libnet-dev
  13. PKG_HASH:=72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63
  14. PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. TARGET_CFLAGS += $(FPIC)
  20. define Package/libnet-1.2.x
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. DEPENDS:=+libpcap
  24. TITLE:=Low-level packet creation library
  25. endef
  26. CONFIGURE_ARGS += \
  27. --enable-shared \
  28. --enable-static
  29. CONFIGURE_VARS += \
  30. ac_cv_libnet_endianess=$(ENDIANESS) \
  31. libnet_cv_have_packet_socket=yes \
  32. LL_INT_TYPE=libnet_link_linux
  33. define Build/Configure
  34. (cd $(PKG_BUILD_DIR); touch \
  35. configure.in \
  36. include.m4 \
  37. aclocal.m4 \
  38. Makefile.in \
  39. );
  40. $(call Build/Configure/Default)
  41. endef
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(STAGING_DIR)/usr/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/include
  45. $(INSTALL_DIR) $(STAGING_DIR)
  46. $(CP) $(PKG_BUILD_DIR)/libnet-config $(STAGING_DIR)/usr
  47. chmod a+x $(STAGING_DIR)/usr/libnet-config
  48. $(INSTALL_DIR) $(STAGING_DIR)/usr/include/libnet
  49. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/include/libnet
  50. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib
  52. endef
  53. define Package/libnet-1.2.x/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
  56. endef
  57. $(eval $(call BuildPackage,libnet-1.2.x))