Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
  54. ${INSTALL_DIR} ${WRKINST}/usr/sbin
  55. ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static ${WRKINST}/usr/sbin/
  56. e2fsprogs-install:
  57. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/etc
  58. ${INSTALL_DATA} ${WRKINST}/etc/mke2fs.conf ${IDIR_E2FSPROGS}/etc/
  59. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib ${IDIR_E2FSPROGS}/usr/sbin
  60. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin/
  61. cd $(IDIR_E2FSPROGS)/usr/sbin && ln -sf e2fsck fsck.ext2
  62. ${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin/
  63. ${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin/
  64. ${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \
  65. ${IDIR_E2FSPROGS}/usr/lib/
  66. libblkid-install:
  67. ${INSTALL_DIR} ${IDIR_LIBBLKID}/usr/lib
  68. ${CP} ${WRKINST}/usr/lib/libblkid.so* \
  69. ${IDIR_LIBBLKID}/usr/lib/
  70. libblkid-dev-install:
  71. ${INSTALL_DIR} ${IDIR_LIBBLKID_DEV}/usr/include/blkid
  72. ${CP} ${WRKINST}/usr/include/blkid/*.h \
  73. ${IDIR_LIBBLKID_DEV}/usr/include/blkid
  74. libcom-err-install:
  75. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR}/usr/lib
  76. ${CP} ${WRKINST}/usr/lib/libcom_err.so* \
  77. ${IDIR_LIBCOM_ERR}/usr/lib/
  78. ${CP} ${WRKINST}/usr/bin/compile_et ${STAGING_HOST_DIR}/bin
  79. libcom-err-dev-install:
  80. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR_DEV}/usr/include/et
  81. ${CP} ${WRKINST}/usr/include/et/com_err.h \
  82. ${IDIR_LIBCOM_ERR_DEV}/usr/include/et
  83. libss-install:
  84. ${INSTALL_DIR} ${IDIR_LIBSS}/usr/lib
  85. ${CP} ${WRKINST}/usr/lib/libss.so* \
  86. ${IDIR_LIBSS}/usr/lib/
  87. libss-dev-install:
  88. ${INSTALL_DIR} ${IDIR_LIBSS_DEV}/usr/include/ss
  89. ${CP} ${WRKINST}/usr/include/ss/ss*.h \
  90. ${IDIR_LIBSS_DEV}/usr/include/ss
  91. libuuid-install:
  92. ${INSTALL_DIR} ${IDIR_LIBUUID}/usr/lib
  93. ${CP} ${WRKINST}/usr/lib/libuuid.so* \
  94. ${IDIR_LIBUUID}/usr/lib/
  95. ${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/include/uuid
  96. ${CP} ${WRKBUILD}/lib/uuid/uuid.h \
  97. ${STAGING_TARGET_DIR}/usr/include/uuid
  98. libuuid-dev-install:
  99. ${INSTALL_DIR} ${IDIR_LIBUUID_DEV}/usr/include
  100. ${CP} ${WRKBUILD}/lib/uuid/uuid.h \
  101. ${IDIR_LIBUUID_DEV}/usr/include
  102. e2fsck-static-install:
  103. ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
  104. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck.static \
  105. ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
  106. include ${TOPDIR}/mk/pkg-bottom.mk