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.

88 lines
2.0 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.11
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/nbd
  13. PKG_MD5SUM:=73d11644a28b9f335292cdb3bdc4b74b
  14. PKG_LICENSE:=GPL-2.0+
  15. PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. # -liconv due to glib2, to be revisited later
  19. include $(INCLUDE_DIR)/nls.mk
  20. PKG_BUILD_DEPENDS:=glib2 libintl
  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. TARGET_CFLAGS += --std=gnu99 -DNODAEMON
  44. define Package/nbd/install
  45. $(INSTALL_DIR) $(1)/usr/sbin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nbd-client $(1)/usr/sbin/
  47. $(INSTALL_DIR) $(1)/etc/config
  48. $(INSTALL_CONF) ./files/nbd-client.conf $(1)/etc/config/nbd-client
  49. $(INSTALL_DIR) $(1)/etc/init.d
  50. $(INSTALL_BIN) ./files/nbd-client.init $(1)/etc/init.d/nbd-client
  51. endef
  52. define Package/nbd/conffiles
  53. /etc/config/nbd-client
  54. endef
  55. $(eval $(call BuildPackage,nbd))
  56. define Package/nbd-server/install
  57. $(INSTALL_DIR) $(1)/usr/bin
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nbd-server $(1)/usr/bin/
  59. $(INSTALL_DIR) $(1)/etc/config
  60. $(INSTALL_CONF) ./files/nbd-server.conf $(1)/etc/config/nbd-server
  61. $(INSTALL_DIR) $(1)/etc/init.d
  62. $(INSTALL_BIN) ./files/nbd-server.init $(1)/etc/init.d/nbd-server
  63. endef
  64. define Package/nbd-server/conffiles
  65. /etc/config/nbd-server
  66. /etc/nbd-server/conf.d
  67. /etc/nbd-server/allow
  68. endef
  69. $(eval $(call BuildPackage,nbd-server))