Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2008-2012 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:=mdadm
  9. PKG_VERSION:=4.0
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
  13. PKG_HASH:=1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/mdadm
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. SUBMENU:=Disc
  22. TITLE:=A tool for managing Soft RAID under Linux
  23. URL:=https://www.kernel.org/pub/linux/utils/raid/mdadm/
  24. DEPENDS:=+libpthread +kmod-md-mod +kmod-md-raid0 +kmod-md-raid10 +kmod-md-raid1
  25. endef
  26. define Package/mdadm/description
  27. A tool for managing Linux Software RAID arrays.
  28. RAID 0, 1 and 10 support included.
  29. If you need RAID 4,5 or 6 functionality please
  30. install kmod-md-raid456 .
  31. endef
  32. define Package/mdadm/conffiles
  33. /etc/config/mdadm
  34. endef
  35. TARGET_CFLAGS += \
  36. -ffunction-sections -fdata-sections \
  37. -DHAVE_STDINT_H -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS \
  38. -DCONFFILE='\"/var/etc/mdadm.conf\"' \
  39. -DMAP_DIR='\"/var/run/mdadm\"' \
  40. -DMDMON_DIR='\"/var/run/mdadm\"' \
  41. -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"'
  42. TARGET_LDFLAGS += -Wl,--gc-sections
  43. MAKE_VARS += CHECK_RUN_DIR=0
  44. define Build/Compile
  45. $(call Build/Compile/Default,mdadm)
  46. endef
  47. define Package/mdadm/install
  48. $(INSTALL_DIR) $(1)/sbin
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
  50. $(INSTALL_DIR) $(1)/etc/init.d
  51. $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
  52. $(INSTALL_DIR) $(1)/etc/config
  53. $(INSTALL_CONF) ./files/mdadm.config $(1)/etc/config/mdadm
  54. endef
  55. $(eval $(call BuildPackage,mdadm))