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.

71 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:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
  13. PKG_MD5SUM:=f051e6e5bdecddb90f77c701c2ca1804
  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/lib/libnet-1.2.x/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
  45. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
  46. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
  47. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/libnet-1.2.x/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))