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.

70 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:=1
  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_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. TARGET_CFLAGS += $(FPIC)
  19. define Package/libnet-1.2.x
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. DEPENDS:=+libpcap
  23. TITLE:=Low-level packet creation library
  24. endef
  25. CONFIGURE_ARGS += \
  26. --enable-shared \
  27. --enable-static
  28. CONFIGURE_VARS += \
  29. ac_cv_libnet_endianess=$(ENDIANESS) \
  30. ac_libnet_have_pf_packet=yes \
  31. LL_INT_TYPE=libnet_link_linux
  32. define Build/Configure
  33. (cd $(PKG_BUILD_DIR); touch \
  34. configure.in \
  35. include.m4 \
  36. aclocal.m4 \
  37. Makefile.in \
  38. );
  39. $(call Build/Configure/Default)
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
  44. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
  46. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
  48. endef
  49. define Package/libnet-1.2.x/install
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
  52. endef
  53. $(eval $(call BuildPackage,libnet-1.2.x))