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.

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