fix copy'n paste error
[buildroot.git] / package / e2fsprogs / e2fsprogs.mk
blobe702cd07684713d922b041377395b722dade5ce5
1 #############################################################
3 # e2fsprogs
5 #############################################################
6 #E2FSPROGS_VERSION:=1.39
7 E2FSPROGS_VERSION:=1.41.4
8 E2FSPROGS_SOURCE=e2fsprogs-$(E2FSPROGS_VERSION).tar.gz
9 E2FSPROGS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/e2fsprogs
10 E2FSPROGS_DIR=$(BUILD_DIR)/e2fsprogs-$(E2FSPROGS_VERSION)
11 E2FSPROGS_CAT:=$(ZCAT)
12 E2FSPROGS_BINARY:=misc/mke2fs
13 E2FSPROGS_TARGET_BINARY:=sbin/mke2fs
15 E2FSPROGS_MISC_STRIP:= \
16 badblocks blkid chattr dumpe2fs filefrag fsck logsave \
17 lsattr mke2fs mklost+found tune2fs uuidgen
19 $(DL_DIR)/$(E2FSPROGS_SOURCE):
20 $(WGET) -P $(DL_DIR) $(E2FSPROGS_SITE)/$(E2FSPROGS_SOURCE)
22 e2fsprogs-source: $(DL_DIR)/$(E2FSPROGS_SOURCE)
24 $(E2FSPROGS_DIR)/.unpacked: $(DL_DIR)/$(E2FSPROGS_SOURCE)
25 $(E2FSPROGS_CAT) $(DL_DIR)/$(E2FSPROGS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
26 toolchain/patch-kernel.sh $(E2FSPROGS_DIR) package/e2fsprogs/ e2fsprogs\*.patch
27 $(CONFIG_UPDATE) $(E2FSPROGS_DIR)/config
28 touch $@
30 $(E2FSPROGS_DIR)/.configured: $(E2FSPROGS_DIR)/.unpacked
31 (cd $(E2FSPROGS_DIR); rm -rf config.cache; \
32 $(AUTO_CONFIGURE_TARGET) \
33 --with-cc=$(TARGET_CC) \
34 --with-linker=$(TARGET_LD) \
35 --with-gnu-ld \
36 --prefix=/usr \
37 --exec-prefix=/usr \
38 --bindir=/bin \
39 --sbindir=/sbin \
40 --libdir=/lib \
41 --libexecdir=/usr/lib \
42 --sysconfdir=/etc \
43 --datadir=/usr/share \
44 --localstatedir=/var \
45 --mandir=/usr/share/man \
46 --infodir=/usr/share/info \
47 --enable-elf-shlibs \
48 --enable-dynamic-e2fsck \
49 --disable-swapfs \
50 --disable-debugfs \
51 --disable-profile \
52 --disable-jbd-debug \
53 --disable-blkid-debug \
54 --disable-testio-debug \
55 --disable-imager \
56 --disable-resizer \
57 --disable-e2initrd-helper \
58 --enable-fsck \
59 --without-catgets \
60 $(if $(BR2__UCLIBC_HAVE_TLS),--enable-tls,--disable-tls) \
61 $(DISABLE_NLS) \
62 $(DISABLE_LARGEFILE) \
64 # do away with unconditionally hiding the commands
65 #find $(E2FSPROGS_DIR) -name "Makefile*" \
66 # | xargs $(SED) '/^ @/s/@/$$\(Q\)/'
67 touch $@
69 $(E2FSPROGS_DIR)/$(E2FSPROGS_BINARY): $(E2FSPROGS_DIR)/.configured
70 $(MAKE) -C $(E2FSPROGS_DIR)
71 (cd $(E2FSPROGS_DIR)/misc; \
72 $(STRIPCMD) $(E2FSPROGS_MISC_STRIP); \
74 #$(STRIPCMD) $(E2FSPROGS_DIR)/lib/lib*.so.*.*
75 touch -c $@
77 $(STAGING_DIR)/lib/libext2fs.a: $(E2FSPROGS_DIR)/$(E2FSPROGS_BINARY)
78 $(MAKE1) PATH=$(TARGET_PATH) DESTDIR=$(STAGING_DIR) LDCONFIG=true \
79 -C $(E2FSPROGS_DIR) install
80 $(INSTALL) -m0644 $(E2FSPROGS_DIR)/lib/*.a $(STAGING_DIR)/lib/
81 #$(INSTALL) -D -m0755 $(STAGING_DIR)/lib/libext2fs.so $@
82 #$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
84 $(TARGET_DIR)/$(E2FSPROGS_TARGET_BINARY): $(E2FSPROGS_DIR)/$(E2FSPROGS_BINARY)
85 $(MAKE1) PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) LDCONFIG=true \
86 -C $(E2FSPROGS_DIR) install
87 rm -rf ${TARGET_DIR}/sbin/mkfs.ext[23] \
88 ${TARGET_DIR}/sbin/fsck.ext[23] \
89 ${TARGET_DIR}/sbin/findfs \
90 ${TARGET_DIR}/sbin/tune2fs
91 ln -sf mke2fs ${TARGET_DIR}/sbin/mkfs.ext2
92 ln -sf mke2fs ${TARGET_DIR}/sbin/mkfs.ext3
93 ln -sf e2fsck ${TARGET_DIR}/sbin/fsck.ext2
94 ln -sf e2fsck ${TARGET_DIR}/sbin/fsck.ext3
95 ln -sf e2label ${TARGET_DIR}/sbin/tune2fs
96 ln -sf e2label ${TARGET_DIR}/sbin/findfs
97 ifneq ($(BR2_HAVE_INFOPAGES),y)
98 rm -rf $(TARGET_DIR)/usr/share/info
99 endif
100 ifneq ($(BR2_HAVE_MANPAGES),y)
101 rm -rf $(TARGET_DIR)/usr/share/man
102 endif
103 rm -rf $(TARGET_DIR)/share/locale
104 rm -rf $(TARGET_DIR)/usr/share/doc
105 touch -c $@
107 e2fsprogs-libs: $(STAGING_DIR)/lib/libext2fs.a
108 e2fsprogs: $(TARGET_DIR)/$(E2FSPROGS_TARGET_BINARY)
110 e2fsprogs-clean e2fsprogs-libs-clean:
111 $(MAKE1) DESTDIR=$(STAGING_DIR) -C $(E2FSPROGS_DIR) uninstall
112 $(MAKE1) DESTDIR=$(TARGET_DIR) -C $(E2FSPROGS_DIR) uninstall
113 -$(MAKE1) -C $(E2FSPROGS_DIR) clean
114 rm -f $(addprefix $(STAGING_DIR)/lib/lib,ext2fs.a e2p.a uuid.a blkid.a)
116 e2fsprogs-dirclean e2fsprogs-libs-dirclean:
117 rm -rf $(E2FSPROGS_DIR)
119 #############################################################
121 # Toplevel Makefile options
123 #############################################################
124 ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
125 TARGETS+=e2fsprogs
126 else
127 ifeq ($(BR2_PACKAGE_E2FSPROGS_LIBS),y)
128 TARGETS+=e2fsprogs-libs
129 endif
130 endif