kernel: fix DMA error when BCM4331 is connected to BCM4706
[openwrt/svn-archive/archive.git] / package / utils / e2fsprogs / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 # Copyright 2010 Vertical Communications
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:=e2fsprogs
11 PKG_VERSION:=1.42.8
12 PKG_MD5SUM:=8ef664b6eb698aa6b733df59b17b9ed4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/e2fsprogs
17
18 PKG_BUILD_DEPENDS:=util-linux
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/e2fsprogs/Default
24 URL:=http://e2fsprogs.sourceforge.net/
25 SUBMENU:=Filesystem
26 endef
27
28 define Package/e2fsprogs
29 $(call Package/e2fsprogs/Default)
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=Ext2/3/4 filesystem utilities
33 DEPENDS:=+libuuid +libext2fs
34 endef
35
36 define Package/e2fsprogs/description
37 This package contains essential ext2 filesystem utilities which consists of
38 e2fsck, mke2fs, tune2fs, and most of the other core ext2
39 filesystem utilities.
40 endef
41
42 define Package/libext2fs
43 $(call Package/e2fsprogs/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 TITLE:=ext2/3/4 filesystem library
47 endef
48
49 define Package/libext2fs/description
50 libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
51 endef
52
53 define Package/tune2fs
54 $(call Package/e2fsprogs)
55 TITLE:=Ext2 Filesystem tune utility
56 DEPENDS:= +e2fsprogs
57 endef
58
59 define Package/e4defrag
60 $(call Package/e2fsprogs)
61 TITLE:=Ext4 Filesystem defrag utility
62 DEPENDS:= +e2fsprogs
63 endef
64
65 define Package/resize2fs
66 $(call Package/e2fsprogs)
67 TITLE:=Ext2 Filesystem resize utility
68 DEPENDS:= +e2fsprogs
69 endef
70
71 define Package/badblocks
72 $(call Package/e2fsprogs)
73 TITLE:=Ext2 Filesystem badblocks utility
74 DEPENDS:= +e2fsprogs
75 endef
76
77 TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
78
79 CONFIGURE_VARS += \
80 ac_cv_lib_pthread_sem_init=no
81
82 CONFIGURE_ARGS += \
83 --disable-testio-debug \
84 --enable-elf-shlibs \
85 --disable-libuuid \
86 --enable-libblkid \
87 --disable-uuidd \
88 --disable-tls \
89 --disable-nls \
90 --disable-rpath
91
92 define Build/Prepare
93 $(call Build/Prepare/Default)
94 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
95 endef
96
97 define Build/Compile
98 $(MAKE) -C $(PKG_BUILD_DIR)/util \
99 BUILDCC="$(HOSTCC)" \
100 CFLAGS="" \
101 CPPFLAGS="" \
102 LDFLAGS="" \
103 subst
104 $(MAKE) -C $(PKG_BUILD_DIR) \
105 LDFLAGS=-Wl,--gc-sections \
106 BUILDCC="$(HOSTCC)" \
107 DESTDIR="$(PKG_INSTALL_DIR)" \
108 LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
109 all
110 endef
111
112 define Package/e2fsprogs/install
113 $(INSTALL_DIR) $(1)/usr/sbin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
116 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
117 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
118 ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
119 $(INSTALL_DIR) $(1)/usr/lib
120 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
121 $(INSTALL_DIR) $(1)/etc/init.d
122 $(INSTALL_DIR) $(1)/lib/functions/fsck
123 $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
124 $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
125 endef
126
127 define Package/libcom_err/install
128 endef
129
130 define Package/libext2fs/install
131 $(INSTALL_DIR) $(1)/usr/lib
132 $(CP) \
133 $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
134 $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
135 $(1)/usr/lib/
136 endef
137
138 define Package/libext2fs/install_lib
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
141 endef
142
143 define Package/tune2fs/install
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
146 endef
147
148 define Package/e4defrag/install
149 $(INSTALL_DIR) $(1)/usr/sbin
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e4defrag $(1)/usr/sbin/
151 endef
152
153 define Package/resize2fs/install
154 $(INSTALL_DIR) $(1)/usr/sbin
155 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
156 endef
157
158 define Package/badblocks/install
159 $(INSTALL_DIR) $(1)/usr/sbin
160 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
161 endef
162
163 $(eval $(call BuildPackage,e2fsprogs))
164 $(eval $(call BuildPackage,libext2fs))
165 $(eval $(call BuildPackage,tune2fs))
166 $(eval $(call BuildPackage,e4defrag))
167 $(eval $(call BuildPackage,resize2fs))
168 $(eval $(call BuildPackage,badblocks))