Makefile 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= e2fsprogs
  5. PKG_VERSION:= 1.42.8
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= 8ef664b6eb698aa6b733df59b17b9ed4
  8. PKG_DESCR:= Ext2/3/4 filesystem utilities (meta-package)
  9. PKG_SECTION:= fs
  10. PKG_DEPENDS:= libcom-err libuuid libblkid libpthread
  11. PKG_DEPENDS:= e2fsck tune2fs mke2fs resize2fs
  12. PKG_BUILDDEP:= util-linux
  13. PKG_URL:= http://e2fsprogs.sourceforge.net/
  14. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
  15. PKG_OPTS:= dev
  16. PKG_CFLINE_E2FSPROGS:= default y if ADK_TARGET_ROOTFS_CF
  17. PKG_SUBPKGS:= E2FSPROGS LIBE2FS LIBCOM_ERR LIBSS E2FSCK_STATIC
  18. PKG_SUBPKGS+= RESIZE2FS TUNE2FS E2FSCK MKE2FS
  19. PKGSD_LIBE2FS:= e2fsprogs library
  20. PKGSC_LIBE2FS:= libs
  21. PKGSD_LIBCOM_ERR:= Common error library
  22. PKGSC_LIBCOM_ERR:= libs
  23. PKGSD_LIBSS:= Subsystem command parsing library
  24. PKGSC_LIBSS:= libs
  25. PKGSD_E2FSCK_STATIC:= Static build of e2fsck
  26. PKGSC_E2FSCK_STATIC:= fs
  27. PKGSD_RESIZE2FS:= Resize FS utility
  28. PKGSC_RESIZE2FS:= fs
  29. PKGSS_RESIZE2FS:= libe2fs libcom-err libblkid
  30. PKGSD_TUNE2FS:= Tune2FS utility
  31. PKGSC_TUNE2FS:= fs
  32. PKGSS_TUNE2FS:= libe2fs libcom-err libblkid libuuid
  33. PKGSD_E2FSCK:= E2fsck utility
  34. PKGSC_E2FSCK:= fs
  35. PKGSS_E2FSCK:= libe2fs libcom-err libblkid libuuid
  36. PKGSD_MKE2FS:= Mke2fs utility
  37. PKGSC_MKE2FS:= fs
  38. PKGSS_MKE2FS:= libe2fs libcom-err libblkid libuuid
  39. include ${TOPDIR}/mk/package.mk
  40. $(eval $(call PKG_template,E2FSPROGS,e2fsprogs,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  41. $(eval $(call PKG_template,LIBE2FS,libe2fs,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBE2FS},${PKGSC_LIBE2FS}))
  42. $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBCOM_ERR},${PKGSC_LIBCOM_ERR}))
  43. $(eval $(call PKG_template,LIBSS,libss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBSS},${PKGSC_LIBSS}))
  44. $(eval $(call PKG_template,E2FSCK_STATIC,e2fsck-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
  45. $(eval $(call PKG_template,TUNE2FS,tune2fs,${PKG_VERSION}-${PKG_RELEASE},$(PKGSS_TUNE2FS),${PKGSD_TUNE2FS},${PKGSC_TUNE2FS}))
  46. $(eval $(call PKG_template,RESIZE2FS,resize2fs,${PKG_VERSION}-${PKG_RELEASE},$(PKGSS_RESIZE2FS),${PKGSD_RESIZE2FS},${PKGSC_RESIZE2FS}))
  47. $(eval $(call PKG_template,MKE2FS,mke2fs,${PKG_VERSION}-${PKG_RELEASE},$(PKGSS_MKE2FS),${PKGSD_MKE2FS},${PKGSC_MKE2FS}))
  48. $(eval $(call PKG_template,E2FSCK,e2fsck,${PKG_VERSION}-${PKG_RELEASE},$(PKGSS_E2FSCK),${PKGSD_E2FSCK},${PKGSC_E2FSCK}))
  49. CONFIGURE_ARGS+= --enable-elf-shlibs --disable-rpath \
  50. --disable-libuuid --disable-libblkid \
  51. --disable-defrag
  52. INSTALL_TARGET+= install-libs
  53. TARGET_LDFLAGS+= -lpthread
  54. TARGET_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include
  55. MAKE_FLAGS+= BUILD_CC="${CC_FOR_BUILD}" \
  56. BUILD_CFLAGS="${CFLAGS_FOR_BUILD}" \
  57. BUILD_LDFLAGS="${LDFLAGS_FOR_BUILD}" \
  58. BUILD_CPPFLAGS="${CPPFLAGS_FOR_BUILD}"
  59. post-build:
  60. ifneq ($(ADK_PACKAGE_E2FSCK_STATIC),)
  61. ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
  62. ${INSTALL_DIR} ${WRKINST}/usr/sbin
  63. ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static ${WRKINST}/usr/sbin
  64. endif
  65. e2fsprogs-install:
  66. # workaround for dev subpackage
  67. mkdir -p ${IDIR_E2FSPROGS_DEV}/usr/bin
  68. ${CP} ${WRKINST}/usr/bin/compile_et \
  69. ${IDIR_E2FSPROGS_DEV}/usr/bin
  70. libe2fs-install:
  71. ${INSTALL_DIR} ${IDIR_LIBE2FS}/etc
  72. ${INSTALL_DATA} ${WRKBUILD}/misc/mke2fs.conf ${IDIR_LIBE2FS}/etc
  73. ${INSTALL_DIR} ${IDIR_LIBE2FS}/usr/lib
  74. ${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \
  75. ${IDIR_LIBE2FS}/usr/lib
  76. e2fsck-install:
  77. ${INSTALL_DIR} ${IDIR_E2FSCK}/usr/sbin
  78. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSCK}/usr/sbin
  79. cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2
  80. mke2fs-install:
  81. ${INSTALL_DIR} ${IDIR_MKE2FS}/usr/sbin
  82. ${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_MKE2FS}/usr/sbin
  83. tune2fs-install:
  84. ${INSTALL_DIR} ${IDIR_TUNE2FS}/usr/sbin
  85. ${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_TUNE2FS}/usr/sbin
  86. resize2fs-install:
  87. ${INSTALL_DIR} ${IDIR_RESIZE2FS}/usr/sbin
  88. ${INSTALL_BIN} ${WRKINST}/usr/sbin/resize2fs ${IDIR_RESIZE2FS}/usr/sbin
  89. libcom-err-install:
  90. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR}/usr/lib
  91. ${CP} ${WRKINST}/usr/lib/libcom_err.so* \
  92. ${IDIR_LIBCOM_ERR}/usr/lib
  93. ${CP} ${WRKINST}/usr/bin/compile_et ${STAGING_HOST_DIR}/bin
  94. libss-install:
  95. ${INSTALL_DIR} ${IDIR_LIBSS}/usr/lib
  96. ${CP} ${WRKINST}/usr/lib/libss.so* \
  97. ${IDIR_LIBSS}/usr/lib
  98. ${CP} ${WRKINST}/usr/bin/mk_cmds ${STAGING_HOST_DIR}/bin
  99. e2fsck-static-install:
  100. ifneq ($(ADK_PACKAGE_E2FSCK_STATIC),)
  101. ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
  102. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck.static \
  103. ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
  104. endif
  105. include ${TOPDIR}/mk/pkg-bottom.mk