Makefile 5.0 KB

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