Makefile 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. PKGSD_LIBUUID:= UUID library
  16. PKGSC_LIBUUID:= libs
  17. PKGSD_LIBCOM_ERR:= Common error library
  18. PKGSC_LIBCOM_ERR:= libs
  19. PKGSD_LIBSS:= Subsystem command parsing library
  20. PKGSC_LIBSS:= libs
  21. PKGSD_LIBBLKID:= Libblkid
  22. PKGSC_LIBBLKID:= libs
  23. PKGSD_E2FSCK_STATIC:= Static build of e2fsck
  24. PKGSC_E2FSCK_STATIC:= fs
  25. include ${TOPDIR}/mk/package.mk
  26. $(eval $(call PKG_template,E2FSPROGS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. $(eval $(call PKG_template,LIBUUID,libuuid,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBUUID},${PKGSC_LIBUUID}))
  28. $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBCOM_ERR},${PKGSC_LIBCOM_ERR}))
  29. $(eval $(call PKG_template,LIBSS,libss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBSS},${PKGSC_LIBSS}))
  30. $(eval $(call PKG_template,LIBBLKID,libblkid,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBLKID},${PKGSC_LIBBLKID}))
  31. $(eval $(call PKG_template,E2FSCK_STATIC,e2fsck-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
  32. CONFIGURE_ARGS+= --enable-elf-shlibs --disable-rpath
  33. INSTALL_TARGET+= install-libs
  34. TLDFLAGS+= -lpthread
  35. pre-build:
  36. ${MAKE} -C ${WRKBUILD}/util \
  37. BUILDCC="${HOSTCC}" \
  38. CFLAGS="" \
  39. LDFLAGS="" \
  40. CPPFLAGS="" \
  41. subst
  42. post-build:
  43. ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
  44. ${INSTALL_DIR} ${WRKINST}/usr/sbin
  45. ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static ${WRKINST}/usr/sbin/
  46. post-install:
  47. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/etc
  48. ${INSTALL_DATA} ${WRKINST}/etc/mke2fs.conf ${IDIR_E2FSPROGS}/etc/
  49. ${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib ${IDIR_E2FSPROGS}/usr/sbin
  50. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin/
  51. cd $(IDIR_E2FSPROGS)/usr/sbin && ln -sf e2fsck fsck.ext2
  52. ${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin/
  53. ${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin/
  54. ${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \
  55. ${IDIR_E2FSPROGS}/usr/lib/
  56. # subpackage libblkid
  57. ${INSTALL_DIR} ${IDIR_LIBBLKID}/usr/lib
  58. ${CP} ${WRKINST}/usr/lib/libblkid.so* \
  59. ${IDIR_LIBBLKID}/usr/lib/
  60. # subpackage libcom_err
  61. ${INSTALL_DIR} ${IDIR_LIBCOM_ERR}/usr/lib
  62. ${CP} ${WRKINST}/usr/lib/libcom_err.so* \
  63. ${IDIR_LIBCOM_ERR}/usr/lib/
  64. # subpackage libss
  65. ${INSTALL_DIR} ${IDIR_LIBSS}/usr/lib
  66. ${CP} ${WRKINST}/usr/lib/libss.so* \
  67. ${IDIR_LIBSS}/usr/lib/
  68. # subpackage libuuid
  69. ${INSTALL_DIR} ${IDIR_LIBUUID}/usr/lib
  70. ${CP} ${WRKINST}/usr/lib/libuuid.so* \
  71. ${IDIR_LIBUUID}/usr/lib/
  72. # install some headers/apps explicitely
  73. ${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/include/uuid
  74. ${CP} ${WRKBUILD}/lib/uuid/uuid.h \
  75. ${STAGING_TARGET_DIR}/usr/include/uuid
  76. ${CP} ${WRKINST}/usr/bin/compile_et ${STAGING_HOST_DIR}/bin
  77. ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
  78. ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck.static \
  79. ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
  80. include ${TOPDIR}/mk/pkg-bottom.mk