nsim: symbols got renamed
[openadk.git] / package / e2fsprogs / Makefile
blobd3e9567e2c6b5d11f3ab1e2e5e6a6be5deb47522
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= e2fsprogs
7 PKG_VERSION:= 1.44.2
8 PKG_RELEASE:= 1
9 PKG_HASH:= 8324cf0b6e81805a741d94087b00e99f7e16144f1ee5a413709a1fa6948b126c
10 PKG_DESCR:= ext2/3/4 filesystem utilities
11 PKG_SECTION:= sys/fs
12 PKG_BUILDDEP:= util-linux
13 PKG_NEEDS:= threads
14 PKG_URL:= http://e2fsprogs.sourceforge.net/
15 PKG_SITES:= https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
16 PKG_OPTS:= dev
17 PKG_NOPARALLEL:= 1
19 PKG_CFLINE_E2FSPROGS:= select BUSYBOX_FSCK
21 PKG_SUBPKGS:= LIBE2FS LIBCOM_ERR LIBSS
22 PKG_SUBPKGS+= RESIZE2FS TUNE2FS E2FSCK MKE2FS
23 PKG_SUBPKGS+= E2FSCK_STATIC TUNE2FS_STATIC
24 PKGSD_LIBE2FS:= e2fsprogs library
25 PKGSC_LIBE2FS:= libs/misc
26 PKGSD_LIBCOM_ERR:= common error library
27 PKGSC_LIBCOM_ERR:= libs/misc
28 PKGSD_LIBSS:= subsystem command parsing library
29 PKGSC_LIBSS:= libs/misc
30 PKGSD_E2FSCK_STATIC:= static build of e2fsck
31 PKGSC_E2FSCK_STATIC:= sys/fs
32 PKGSD_TUNE2FS_STATIC:= static build of tune2fs
33 PKGSC_TUNE2FS_STATIC:= sys/fs
34 PKGSD_RESIZE2FS:= ext2/3/4 resize utility
35 PKGSC_RESIZE2FS:= sys/fs
36 PKGSS_RESIZE2FS:= libe2fs libcom-err libblkid
37 PKGSD_TUNE2FS:= ext2/3/4 tune utility
38 PKGSC_TUNE2FS:= sys/fs
39 PKGSS_TUNE2FS:= libe2fs libcom-err libblkid libuuid
40 PKGSD_E2FSCK:= ext2/3/4 filesystem check utility
41 PKGSC_E2FSCK:= sys/fs
42 PKGSS_E2FSCK:= libe2fs libcom-err libblkid libuuid
43 PKGSD_MKE2FS:= ext2/3/4 filesystem creation utility
44 PKGSC_MKE2FS:= sys/fs
45 PKGSS_MKE2FS:= libe2fs libcom-err libblkid libuuid libncurses
47 include $(ADK_TOPDIR)/mk/host.mk
48 include $(ADK_TOPDIR)/mk/package.mk
50 $(eval $(call HOST_template,E2FSPROGS,e2fsprogs,$(PKG_VERSION)-$(PKG_RELEASE)))
51 $(eval $(call PKG_template,LIBE2FS,libe2fs,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBE2FS),$(PKGSC_LIBE2FS),$(PKG_OPTS)))
52 $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBCOM_ERR),$(PKGSC_LIBCOM_ERR),$(PKG_OPTS)))
53 $(eval $(call PKG_template,LIBSS,libss,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBSS),$(PKGSC_LIBSS),$(PKG_OPTS)))
54 $(eval $(call PKG_template,TUNE2FS,tune2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_TUNE2FS),$(PKGSD_TUNE2FS),$(PKGSC_TUNE2FS)))
55 $(eval $(call PKG_template,RESIZE2FS,resize2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_RESIZE2FS),$(PKGSD_RESIZE2FS),$(PKGSC_RESIZE2FS)))
56 $(eval $(call PKG_template,MKE2FS,mke2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_MKE2FS),$(PKGSD_MKE2FS),$(PKGSC_MKE2FS)))
57 $(eval $(call PKG_template,E2FSCK,e2fsck,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_E2FSCK),$(PKGSD_E2FSCK),$(PKGSC_E2FSCK)))
58 $(eval $(call PKG_template,E2FSCK_STATIC,e2fsck-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
59 $(eval $(call PKG_template,TUNE2FS_STATIC,tune2fs-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
61 HOST_CONFIGURE_ARGS+= --disable-rpath \
62 --disable-nls \
63 --disable-uuidd \
64 --disable-defrag \
65 --disable-debugfs
67 ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
68 CONFIGURE_ARGS+= --disable-elf-shlibs
69 else
70 CONFIGURE_ARGS+= --enable-elf-shlibs
71 endif
73 CONFIGURE_ARGS+= --disable-rpath \
74 --disable-uuidd \
75 --disable-testio-debug \
76 --disable-defrag \
77 --disable-libblkid \
78 --disable-libuuid \
79 --disable-debugfs
80 TARGET_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_TARGET_DIR)/usr/include
81 MAKE_FLAGS+= BUILD_CC="$(HOST_CC)" \
82 BUILD_CFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -I$(WRKSRC)/lib -I." \
83 BUILD_LDFLAGS="$(HOST_LDFLAGS)"
85 post-install:
86 $(CP) $(WRKBUILD)/lib/libext*.a $(STAGING_TARGET_DIR)/usr/lib
87 $(INSTALL_DIR) $(STAGING_TARGET_DIR)/usr/include/ext2fs
88 $(INSTALL_DIR) $(STAGING_TARGET_DIR)/usr/include/et
89 $(CP) $(WRKBUILD)/lib/ext2fs/*.h \
90 $(STAGING_TARGET_DIR)/usr/include/ext2fs
91 $(CP) $(WRKBUILD)/lib/et/*.h \
92 $(STAGING_TARGET_DIR)/usr/include/et
94 libe2fs-install:
95 $(INSTALL_DIR) $(IDIR_LIBE2FS)/etc
96 $(INSTALL_DATA) $(WRKBUILD)/misc/mke2fs.conf $(IDIR_LIBE2FS)/etc
97 $(INSTALL_DIR) $(IDIR_LIBE2FS)/usr/lib
98 $(CP) $(WRKINST)/usr/lib/lib{e2p,ext2fs}.so.* \
99 $(IDIR_LIBE2FS)/usr/lib
101 e2fsck-install:
102 $(INSTALL_DIR) $(IDIR_E2FSCK)/usr/sbin
103 $(INSTALL_BIN) $(WRKINST)/usr/sbin/e2fsck $(IDIR_E2FSCK)/usr/sbin
104 cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2
105 cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext3
106 cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext4
108 mke2fs-install:
109 $(INSTALL_DIR) $(IDIR_MKE2FS)/usr/sbin
110 $(INSTALL_BIN) $(WRKINST)/usr/sbin/mke2fs $(IDIR_MKE2FS)/usr/sbin
111 cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext2
112 cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext3
113 cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext4
115 tune2fs-install:
116 $(INSTALL_DIR) $(IDIR_TUNE2FS)/usr/sbin
117 $(INSTALL_BIN) $(WRKINST)/usr/sbin/tune2fs $(IDIR_TUNE2FS)/usr/sbin
119 resize2fs-install:
120 $(INSTALL_DIR) $(IDIR_RESIZE2FS)/usr/sbin
121 $(INSTALL_BIN) $(WRKINST)/usr/sbin/resize2fs $(IDIR_RESIZE2FS)/usr/sbin
123 libcom-err-install:
124 $(INSTALL_DIR) $(IDIR_LIBCOM_ERR)/usr/lib
125 $(CP) $(WRKINST)/usr/lib/libcom_err.so* \
126 $(IDIR_LIBCOM_ERR)/usr/lib
128 libss-install:
129 $(INSTALL_DIR) $(IDIR_LIBSS)/usr/lib
130 $(CP) $(WRKINST)/usr/lib/libss.so* \
131 $(IDIR_LIBSS)/usr/lib
133 e2fsck-static-install:
134 ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
135 ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
136 ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static \
137 ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
139 tune2fs-static-install:
140 ${MAKE} -C ${WRKBUILD}/misc tune2fs.static
141 ${INSTALL_DIR} ${IDIR_TUNE2FS_STATIC}/usr/sbin
142 ${INSTALL_BIN} ${WRKBUILD}/misc/tune2fs.static \
143 ${IDIR_TUNE2FS_STATIC}/usr/sbin/tune2fs
145 include $(ADK_TOPDIR)/mk/host-bottom.mk
146 include $(ADK_TOPDIR)/mk/pkg-bottom.mk