6c4145ad6d1075682fa2bce5a1fdb9041f20d215
[openwrt/svn-archive/archive.git] / package / utils / mdadm / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mdadm
11 PKG_VERSION:=3.2.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_MD5SUM:=2fd33dedcdb06f0d1461f50ddabb7e4a
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19
20 PKG_BUILD_PARALLEL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/mdadm
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=A tool for managing Soft RAID under Linux
28 URL:=http://www.kernel.org/pub/linux/utils/raid/mdadm/
29 DEPENDS:=+@KERNEL_DIRECT_IO
30 endef
31
32 define Package/mdadm/description
33 A tool for managing Linux Software RAID arrays.
34 endef
35
36 TARGET_CFLAGS += -ffunction-sections -fdata-sections
37 TARGET_LDFLAGS += -Wl,--gc-sections
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CC="$(TARGET_CC)" \
42 CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \
43 LDFLAGS="$(TARGET_LDFLAGS)" \
44 mdadm mdassemble
45 endef
46
47 define Package/mdadm/install
48 $(INSTALL_DIR) $(1)/sbin
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdassemble $(1)/sbin
51 endef
52
53 $(eval $(call BuildPackage,mdadm))