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.

90 lines
2.1 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:=nbd
  9. PKG_VERSION:=3.19
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/nbd
  13. PKG_HASH:=b4466412f13e057659f25d35e1e8e181afd62c7179bff22a6add81445ecb8690
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
  16. PKG_CPE_ID:=cpe:/a:network_block_device:nbd
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. # -liconv due to glib2, to be revisited later
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/nbd
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=Network Block Device utilities
  25. URL:=http://nbd.sourceforge.net
  26. DEPENDS:=+kmod-nbd
  27. endef
  28. define Package/nbd/description
  29. This package contains the network block device client.
  30. endef
  31. define Package/nbd-server
  32. SECTION:=net
  33. CATEGORY:=Network
  34. TITLE:=Network Block Device Server
  35. URL:=http://nbd.sourceforge.net
  36. DEPENDS:=+glib2
  37. endef
  38. define Package/nbd-server/description
  39. This package contains the network block device server.
  40. endef
  41. CONFIGURE_ARGS += \
  42. --disable-glibtest \
  43. --without-gnutls \
  44. --without-libnl \
  45. --with-syslog
  46. TARGET_CFLAGS += --std=gnu99 -DNODAEMON
  47. define Package/nbd/install
  48. $(INSTALL_DIR) $(1)/usr/sbin
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nbd-client $(1)/usr/sbin/
  50. $(INSTALL_DIR) $(1)/etc/config
  51. $(INSTALL_CONF) ./files/nbd-client.conf $(1)/etc/config/nbd-client
  52. $(INSTALL_DIR) $(1)/etc/init.d
  53. $(INSTALL_BIN) ./files/nbd-client.init $(1)/etc/init.d/nbd-client
  54. endef
  55. define Package/nbd/conffiles
  56. /etc/config/nbd-client
  57. endef
  58. $(eval $(call BuildPackage,nbd))
  59. define Package/nbd-server/install
  60. $(INSTALL_DIR) $(1)/usr/bin
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nbd-server $(1)/usr/bin/
  62. $(INSTALL_DIR) $(1)/etc/config
  63. $(INSTALL_CONF) ./files/nbd-server.conf $(1)/etc/config/nbd-server
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) ./files/nbd-server.init $(1)/etc/init.d/nbd-server
  66. endef
  67. define Package/nbd-server/conffiles
  68. /etc/config/nbd-server
  69. /etc/nbd-server/conf.d
  70. /etc/nbd-server/allow
  71. endef
  72. $(eval $(call BuildPackage,nbd-server))