Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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_MD5SUM:=2fd33dedcdb06f0d1461f50ddabb7e4a
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  15. PKG_BUILD_PARALLEL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/mdadm
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. TITLE:=A tool for managing Soft RAID under Linux
  21. URL:=http://www.kernel.org/pub/linux/utils/raid/mdadm/
  22. DEPENDS:=+@KERNEL_DIRECT_IO
  23. endef
  24. define Package/mdadm/description
  25. A tool for managing Linux Software RAID arrays.
  26. endef
  27. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  28. TARGET_LDFLAGS += -Wl,--gc-sections
  29. define Build/Compile
  30. $(MAKE) -C $(PKG_BUILD_DIR) \
  31. CC="$(TARGET_CC)" \
  32. CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \
  33. LDFLAGS="$(TARGET_LDFLAGS)" \
  34. mdadm
  35. endef
  36. define Package/mdadm/install
  37. $(INSTALL_DIR) $(1)/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
  39. endef
  40. $(eval $(call BuildPackage,mdadm))