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.

87 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2006-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:=libdnet
  9. PKG_VERSION:=1.12
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
  12. PKG_SOURCE_URL:=http://libdnet.googlecode.com/files/
  13. PKG_MD5SUM:=9253ef6de1b5e28e9c9a62b882e44cc9
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=BSD
  17. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libdnet
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=Low-level network library
  23. URL:=http://sourceforge.net/projects/libdnet/
  24. endef
  25. define Package/libdnet/description
  26. libdnet is a library of simplified, portable interface to several low-level
  27. networking routines.
  28. endef
  29. TARGET_CFLAGS += $(FPIC)
  30. CONFIGURE_ARGS += \
  31. --enable-shared \
  32. --enable-static \
  33. --without-check \
  34. --without-python
  35. CONFIGURE_VARS += \
  36. ac_cv_dnet_bsd_bpf=no
  37. MAKE_FLAGS += \
  38. CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(2)/bin
  41. $(INSTALL_BIN) \
  42. $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
  43. $(2)/bin/
  44. $(SED) \
  45. 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  46. $(2)/bin/dnet-config
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(INSTALL_DATA)\
  49. $(PKG_INSTALL_DIR)/usr/include/dnet.h \
  50. $(1)/usr/include/
  51. $(CP) \
  52. $(PKG_INSTALL_DIR)/usr/include/dnet \
  53. $(1)/usr/include/
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
  57. $(1)/usr/lib/
  58. endef
  59. define Package/libdnet/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) \
  62. $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
  63. $(1)/usr/lib/
  64. $(INSTALL_DIR) $(1)/usr/sbin
  65. $(INSTALL_BIN) \
  66. $(PKG_INSTALL_DIR)/usr/sbin/dnet \
  67. $(1)/usr/sbin/
  68. endef
  69. $(eval $(call BuildPackage,libdnet))