1
0

Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
  13. PKG_HASH:=461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_FLAGS:=gc-sections
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/mdadm
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. SUBMENU:=Disc
  23. TITLE:=A tool for managing Soft RAID under Linux
  24. URL:=https://www.kernel.org/pub/linux/utils/raid/mdadm/
  25. DEPENDS:=+libpthread +kmod-md-mod +kmod-md-raid0 +kmod-md-raid10 +kmod-md-raid1
  26. endef
  27. define Package/mdadm/description
  28. A tool for managing Linux Software RAID arrays.
  29. RAID 0, 1 and 10 support included.
  30. If you need RAID 4,5 or 6 functionality please
  31. install kmod-md-raid456 .
  32. endef
  33. define Package/mdadm/conffiles
  34. /etc/config/mdadm
  35. endef
  36. TARGET_CFLAGS += \
  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. -DNO_LIBUDEV \
  43. -D_LARGEFILE64_SOURCE
  44. TARGET_CXFLAGS = -DNO_LIBUDEV
  45. MAKE_FLAGS += \
  46. CHECK_RUN_DIR=0 \
  47. CXFLAGS="$(TARGET_CXFLAGS)"
  48. define Build/Compile
  49. $(call Build/Compile/Default,mdadm)
  50. endef
  51. define Package/mdadm/install
  52. $(INSTALL_DIR) $(1)/sbin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
  56. $(INSTALL_DIR) $(1)/etc/config
  57. $(INSTALL_CONF) ./files/mdadm.config $(1)/etc/config/mdadm
  58. endef
  59. $(eval $(call BuildPackage,mdadm))