Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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:=3.2.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_HASH:=ec1d264e4126309aafe76d76067e8f3fd6649941cff6cb0242d467a1e66a01e0
  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:=+@KERNEL_DIRECT_IO
  24. endef
  25. define Package/mdadm/description
  26. A tool for managing Linux Software RAID arrays.
  27. endef
  28. define Package/mdadm/conffiles
  29. /etc/mdadm.conf
  30. /etc/config/mdadm
  31. endef
  32. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  33. TARGET_LDFLAGS += -Wl,--gc-sections
  34. define Build/Compile
  35. $(MAKE) -C $(PKG_BUILD_DIR) \
  36. CC="$(TARGET_CC)" \
  37. CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \
  38. LDFLAGS="$(TARGET_LDFLAGS)" \
  39. mdadm
  40. endef
  41. define Package/mdadm/install
  42. $(INSTALL_DIR) $(1)/sbin
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
  44. $(INSTALL_DIR) $(1)/etc/init.d
  45. $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
  46. $(INSTALL_DIR) $(1)/etc/config
  47. $(INSTALL_DATA) ./files/mdadm.config $(1)/etc/config/mdadm
  48. endef
  49. $(eval $(call BuildPackage,mdadm))