2b44db284f49773aa1b16bef7ac3ce090bfac8aa
[openwrt/staging/wigyori.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:=4.0
12 PKG_RELEASE:=4
13
14 PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_HASH:=1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
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 SUBMENU:=Disc
28 TITLE:=A tool for managing Soft RAID under Linux
29 URL:=http://www.kernel.org/pub/linux/utils/raid/mdadm/
30 DEPENDS:=+libpthread +kmod-md-mod +kmod-md-raid0 +kmod-md-raid10 +kmod-md-raid1
31 endef
32
33 define Package/mdadm/description
34 A tool for managing Linux Software RAID arrays.
35 RAID 0, 1 and 10 support included.
36 If you need RAID 4,5 or 6 functionality please
37 install kmod-md-raid456 .
38 endef
39
40 define Package/mdadm/conffiles
41 /etc/config/mdadm
42 endef
43
44 TARGET_CFLAGS += \
45 -ffunction-sections -fdata-sections \
46 -DHAVE_STDINT_H -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS \
47 -DCONFFILE='\"/var/etc/mdadm.conf\"' \
48 -DMAP_DIR='\"/var/run/mdadm\"' \
49 -DMDMON_DIR='\"/var/run/mdadm\"' \
50 -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"'
51
52 TARGET_LDFLAGS += -Wl,--gc-sections
53
54 MAKE_VARS += CHECK_RUN_DIR=0
55
56 define Build/Compile
57 $(call Build/Compile/Default,mdadm)
58 endef
59
60 define Package/mdadm/install
61 $(INSTALL_DIR) $(1)/sbin
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
63 $(INSTALL_DIR) $(1)/etc/init.d
64 $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
65 $(INSTALL_DIR) $(1)/etc/config
66 $(INSTALL_DATA) ./files/mdadm.config $(1)/etc/config/mdadm
67 endef
68
69 $(eval $(call BuildPackage,mdadm))