Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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:=http://sourceforge.net/projects/libnet-dev/files/
  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)/usr/include/libnet
  46. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/include/libnet
  47. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib
  49. endef
  50. define Package/libnet-1.2.x/install
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
  53. endef
  54. $(eval $(call BuildPackage,libnet-1.2.x))