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
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.16.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/nbd
  13. PKG_HASH:=422f62bdf6e6b973bd82083dc52b6577396fe00aa6607837ac464e476124155b
  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 gettext
  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. TARGET_CFLAGS += --std=gnu99 -DNODAEMON
  45. define Package/nbd/install
  46. $(INSTALL_DIR) $(1)/usr/sbin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nbd-client $(1)/usr/sbin/
  48. $(INSTALL_DIR) $(1)/etc/config
  49. $(INSTALL_CONF) ./files/nbd-client.conf $(1)/etc/config/nbd-client
  50. $(INSTALL_DIR) $(1)/etc/init.d
  51. $(INSTALL_BIN) ./files/nbd-client.init $(1)/etc/init.d/nbd-client
  52. endef
  53. define Package/nbd/conffiles
  54. /etc/config/nbd-client
  55. endef
  56. $(eval $(call BuildPackage,nbd))
  57. define Package/nbd-server/install
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nbd-server $(1)/usr/bin/
  60. $(INSTALL_DIR) $(1)/etc/config
  61. $(INSTALL_CONF) ./files/nbd-server.conf $(1)/etc/config/nbd-server
  62. $(INSTALL_DIR) $(1)/etc/init.d
  63. $(INSTALL_BIN) ./files/nbd-server.init $(1)/etc/init.d/nbd-server
  64. endef
  65. define Package/nbd-server/conffiles
  66. /etc/config/nbd-server
  67. /etc/nbd-server/conf.d
  68. /etc/nbd-server/allow
  69. endef
  70. $(eval $(call BuildPackage,nbd-server))