Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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:=2
  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 <[email protected]>
  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/mdadm.conf
  33. /etc/config/mdadm
  34. endef
  35. TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS
  36. TARGET_LDFLAGS += -Wl,--gc-sections
  37. define Build/Compile
  38. $(MAKE) -C $(PKG_BUILD_DIR) \
  39. CC="$(TARGET_CC)" \
  40. CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \
  41. LDFLAGS="$(TARGET_LDFLAGS)" \
  42. CHECK_RUN_DIR=0 \
  43. mdadm
  44. endef
  45. define Package/mdadm/install
  46. $(INSTALL_DIR) $(1)/sbin
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
  48. $(INSTALL_DIR) $(1)/etc/init.d
  49. $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
  50. $(INSTALL_DIR) $(1)/etc/config
  51. $(INSTALL_DATA) ./files/mdadm.config $(1)/etc/config/mdadm
  52. endef
  53. $(eval $(call BuildPackage,mdadm))