Makefile 1.7 KB

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