1
0

Makefile 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.41.14
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 05f70470aea2ef7efbb0845b2b116720
  8. PKG_DESCR:= Ext2/3/4 filesystem utilities
  9. PKG_SECTION:= fs
  10. PKG_DEPENDS:= libcom-err libuuid libblkid libpthread
  11. PKG_URL:= http://e2fsprogs.sourceforge.net/
  12. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
  13. PKG_CFLINE_E2FSPROGS:= default y if ADK_TARGET_ROOTFS_CF
  14. PKG_SUBPKGS:= E2FSPROGS LIBUUID LIBCOM_ERR LIBSS LIBBLKID E2FSCK_STATIC
  15. PKG_SUBPKGS+= LIBCOM_ERR_DEV LIBSS_DEV LIBUUID_DEV LIBBLKID_DEV
  16. PKGSD_LIBUUID:= UUID library
  17. PKGSC_LIBUUID:= libs
  18. PKGSD_LIBUUID_DEV:= UUID headers
  19. PKGSC_LIBUUID_DEV:= devel
  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_LIBBLKID:= blkid library
  29. PKGSC_LIBBLKID:= libs
  30. PKGSD_LIBBLKID_DEV:= blkid headers
  31. PKGSC_LIBBLKID_DEV:= devel
  32. PKGSD_E2FSCK_STATIC:= Static build of e2fsck
  33. PKGSC_E2FSCK_STATIC:= fs
  34. include ${TOPDIR}/mk/package.mk
  35. $(eval $(call PKG_template,E2FSPROGS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  36. $(eval $(call PKG_template,LIBUUID,libuuid,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBUUID},${PKGSC_LIBUUID}))
  37. $(eval $(call PKG_template,LIBUUID_DEV,libuuid-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBUUID_DEV},${PKGSC_LIBUUID_DEV}))
  38. $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBCOM_ERR},${PKGSC_LIBCOM_ERR}))
  39. $(eval $(call PKG_template,LIBCOM_ERR_DEV,libcom-err-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBCOM_ERR_DEV},${PKGSC_LIBCOM_ERR_DEV}))
  40. $(eval $(call PKG_template,LIBSS,libss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBSS},${PKGSC_LIBSS}))
  41. $(eval $(call PKG_template,LIBSS_DEV,libss-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBSS_DEV},${PKGSC_LIBSS_DEV}))
  42. $(eval $(call PKG_template,LIBBLKID,libblkid,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBLKID},${PKGSC_LIBBLKID}))
  43. $(eval $(call PKG_template,LIBBLKID_DEV,libblkid-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBLKID_DEV},${PKGSC_LIBBLKID_DEV}))
  44. $(eval $(call PKG_template,E2FSCK_STATIC,e2fsck-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
  45. CONFIGURE_ARGS+= --enable-elf-shlibs --disable-rpath
  46. INSTALL_TARGET+= install-libs
  47. TARGET_LDFLAGS+= -lpthread
  48. MAKE_FLAGS+= BUILD_CC="${CC_FOR_BUILD}" \
  49. BUILD_CFLAGS="${CFLAGS_FOR_BUILD}" \
  50. BUILD_LDFLAGS="${LDFLAGS_FOR_BUILD}" \
  51. BUILD_CPPFLAGS="${CPPFLAGS_FOR_BUILD}"
  52. post-build:
  53. ifeq ($(ADK_PACKAGE_E2FSCK_STATIC),y)
  54. ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
  55. ${INSTALL_DIR} ${WRKINST}/usr/sbin
  56. ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static ${WRKINST}/usr/sbin
  57. endif
  58. e2fsprogs-install:
  59. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/etc
  60. ${INSTALL_DATA} ${WRKINST}/etc/mke2fs.conf ${IDIR_E2FSPROGS}/etc
  61. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib ${IDIR_E2FSPROGS}/usr/sbin
  62. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin
  63. cd $(IDIR_E2FSPROGS)/usr/sbin && ln -sf e2fsck fsck.ext2
  64. ${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin
  65. ${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin
  66. ${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \
  67. ${IDIR_E2FSPROGS}/usr/lib
  68. libblkid-install:
  69. ${INSTALL_DIR} ${IDIR_LIBBLKID}/usr/lib
  70. ${CP} ${WRKINST}/usr/lib/libblkid.so* \
  71. ${IDIR_LIBBLKID}/usr/lib
  72. libblkid-dev-install:
  73. ${INSTALL_DIR} ${IDIR_LIBBLKID_DEV}/usr/include/blkid
  74. ${CP} ${WRKINST}/usr/include/blkid/*.h \
  75. ${IDIR_LIBBLKID_DEV}/usr/include/blkid
  76. libcom-err-install:
  77. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR}/usr/lib
  78. ${CP} ${WRKINST}/usr/lib/libcom_err.so* \
  79. ${IDIR_LIBCOM_ERR}/usr/lib
  80. ${CP} ${WRKINST}/usr/bin/compile_et ${STAGING_HOST_DIR}/bin
  81. libcom-err-dev-install:
  82. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR_DEV}/usr/include/et
  83. ${CP} ${WRKINST}/usr/include/et/com_err.h \
  84. ${IDIR_LIBCOM_ERR_DEV}/usr/include/et
  85. libss-install:
  86. ${INSTALL_DIR} ${IDIR_LIBSS}/usr/lib
  87. ${CP} ${WRKINST}/usr/lib/libss.so* \
  88. ${IDIR_LIBSS}/usr/lib
  89. ${CP} ${WRKINST}/usr/bin/mk_cmds ${STAGING_HOST_DIR}/bin
  90. libss-dev-install:
  91. ${INSTALL_DIR} ${IDIR_LIBSS_DEV}/usr/include/ss
  92. ${CP} ${WRKINST}/usr/include/ss/ss*.h \
  93. ${IDIR_LIBSS_DEV}/usr/include/ss
  94. libuuid-install:
  95. ${INSTALL_DIR} ${IDIR_LIBUUID}/usr/lib
  96. ${CP} ${WRKINST}/usr/lib/libuuid.so* \
  97. ${IDIR_LIBUUID}/usr/lib
  98. ${INSTALL_DIR} ${STAGING_DIR}/usr/include/uuid
  99. ${CP} ${WRKBUILD}/lib/uuid/uuid.h \
  100. ${STAGING_DIR}/usr/include/uuid
  101. libuuid-dev-install:
  102. ${INSTALL_DIR} ${IDIR_LIBUUID_DEV}/usr/include
  103. ${CP} ${WRKBUILD}/lib/uuid/uuid.h \
  104. ${IDIR_LIBUUID_DEV}/usr/include
  105. e2fsck-static-install:
  106. ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
  107. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck.static \
  108. ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
  109. include ${TOPDIR}/mk/pkg-bottom.mk