Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= e2fsprogs
  5. PKG_VERSION:= 1.43.2
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= ddba23e44e06cbe32c7b1026bc92f9487b9cb08c89e961d007cb2a5e87c4ef5e
  8. PKG_DESCR:= ext2/3/4 filesystem utilities
  9. PKG_SECTION:= sys/fs
  10. PKG_BUILDDEP:= util-linux
  11. PKG_NEEDS:= threads
  12. PKG_URL:= http://e2fsprogs.sourceforge.net/
  13. PKG_SITES:= https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
  14. PKG_OPTS:= dev
  15. PKG_NOPARALLEL:= 1
  16. PKG_CFLINE_E2FSPROGS:= select BUSYBOX_FSCK
  17. PKG_SUBPKGS:= LIBE2FS LIBCOM_ERR LIBSS
  18. PKG_SUBPKGS+= RESIZE2FS TUNE2FS E2FSCK MKE2FS
  19. PKG_SUBPKGS+= E2FSCK_STATIC TUNE2FS_STATIC
  20. PKGSD_LIBE2FS:= e2fsprogs library
  21. PKGSC_LIBE2FS:= libs/misc
  22. PKGSD_LIBCOM_ERR:= common error library
  23. PKGSC_LIBCOM_ERR:= libs/misc
  24. PKGSD_LIBSS:= subsystem command parsing library
  25. PKGSC_LIBSS:= libs/misc
  26. PKGSD_E2FSCK_STATIC:= Static build of e2fsck
  27. PKGSC_E2FSCK_STATIC:= sys/fs
  28. PKGSD_TUNE2FS_STATIC:= Static build of tune2fs
  29. PKGSC_TUNE2FS_STATIC:= sys/fs
  30. PKGSD_RESIZE2FS:= ext2/3/4 resize utility
  31. PKGSC_RESIZE2FS:= sys/fs
  32. PKGSS_RESIZE2FS:= libe2fs libcom-err libblkid
  33. PKGSD_TUNE2FS:= ext2/3/4 tune utility
  34. PKGSC_TUNE2FS:= sys/fs
  35. PKGSS_TUNE2FS:= libe2fs libcom-err libblkid libuuid
  36. PKGSD_E2FSCK:= ext2/3/4 filesystem check utility
  37. PKGSC_E2FSCK:= sys/fs
  38. PKGSS_E2FSCK:= libe2fs libcom-err libblkid libuuid
  39. PKGSD_MKE2FS:= ext2/3/4 filesystem creation utility
  40. PKGSC_MKE2FS:= sys/fs
  41. PKGSS_MKE2FS:= libe2fs libcom-err libblkid libuuid libncurses
  42. include $(ADK_TOPDIR)/mk/host.mk
  43. include $(ADK_TOPDIR)/mk/package.mk
  44. $(eval $(call HOST_template,E2FSPROGS,e2fsprogs,$(PKG_VERSION)-$(PKG_RELEASE)))
  45. $(eval $(call PKG_template,LIBE2FS,libe2fs,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBE2FS),$(PKGSC_LIBE2FS),$(PKG_OPTS)))
  46. $(eval $(call PKG_template,LIBCOM_ERR,libcom-err,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBCOM_ERR),$(PKGSC_LIBCOM_ERR),$(PKG_OPTS)))
  47. $(eval $(call PKG_template,LIBSS,libss,$(PKG_VERSION)-$(PKG_RELEASE),,$(PKGSD_LIBSS),$(PKGSC_LIBSS),$(PKG_OPTS)))
  48. $(eval $(call PKG_template,TUNE2FS,tune2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_TUNE2FS),$(PKGSD_TUNE2FS),$(PKGSC_TUNE2FS)))
  49. $(eval $(call PKG_template,RESIZE2FS,resize2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_RESIZE2FS),$(PKGSD_RESIZE2FS),$(PKGSC_RESIZE2FS)))
  50. $(eval $(call PKG_template,MKE2FS,mke2fs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_MKE2FS),$(PKGSD_MKE2FS),$(PKGSC_MKE2FS)))
  51. $(eval $(call PKG_template,E2FSCK,e2fsck,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_E2FSCK),$(PKGSD_E2FSCK),$(PKGSC_E2FSCK)))
  52. $(eval $(call PKG_template,E2FSCK_STATIC,e2fsck-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
  53. $(eval $(call PKG_template,TUNE2FS_STATIC,tune2fs-static,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_E2FSCK_STATIC},${PKGSC_E2FSCK_STATIC}))
  54. HOST_CONFIGURE_ARGS+= --disable-rpath \
  55. --disable-nls \
  56. --disable-uuidd \
  57. --disable-defrag \
  58. --disable-debugfs
  59. ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
  60. CONFIGURE_ARGS+= --disable-elf-shlibs
  61. else
  62. CONFIGURE_ARGS+= --enable-elf-shlibs
  63. endif
  64. CONFIGURE_ARGS+= --disable-rpath \
  65. --disable-uuidd \
  66. --disable-testio-debug \
  67. --disable-defrag \
  68. --disable-debugfs \
  69. --enable-verbose-makecmds \
  70. --enable-libblkid \
  71. --enable-libuuid
  72. TARGET_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_TARGET_DIR)/usr/include
  73. MAKE_FLAGS+= BUILD_CC="$(HOST_CC)" \
  74. BUILD_CFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -I$(WRKSRC)/lib -I." \
  75. BUILD_LDFLAGS="$(HOST_LDFLAGS)"
  76. libe2fs-install:
  77. $(INSTALL_DIR) $(IDIR_LIBE2FS)/etc
  78. $(INSTALL_DATA) $(WRKBUILD)/misc/mke2fs.conf $(IDIR_LIBE2FS)/etc
  79. $(INSTALL_DIR) $(IDIR_LIBE2FS)/usr/lib
  80. $(CP) $(WRKINST)/usr/lib/lib{e2p,ext2fs}.so.* \
  81. $(IDIR_LIBE2FS)/usr/lib
  82. e2fsck-install:
  83. $(INSTALL_DIR) $(IDIR_E2FSCK)/usr/sbin
  84. $(INSTALL_BIN) $(WRKINST)/usr/sbin/e2fsck $(IDIR_E2FSCK)/usr/sbin
  85. cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2
  86. cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext3
  87. cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext4
  88. mke2fs-install:
  89. $(INSTALL_DIR) $(IDIR_MKE2FS)/usr/sbin
  90. $(INSTALL_BIN) $(WRKINST)/usr/sbin/mke2fs $(IDIR_MKE2FS)/usr/sbin
  91. cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext2
  92. cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext3
  93. cd $(IDIR_MKE2FS)/usr/sbin && ln -sf mke2fs mkfs.ext4
  94. tune2fs-install:
  95. $(INSTALL_DIR) $(IDIR_TUNE2FS)/usr/sbin
  96. $(INSTALL_BIN) $(WRKINST)/usr/sbin/tune2fs $(IDIR_TUNE2FS)/usr/sbin
  97. resize2fs-install:
  98. $(INSTALL_DIR) $(IDIR_RESIZE2FS)/usr/sbin
  99. $(INSTALL_BIN) $(WRKINST)/usr/sbin/resize2fs $(IDIR_RESIZE2FS)/usr/sbin
  100. libcom-err-install:
  101. $(INSTALL_DIR) $(IDIR_LIBCOM_ERR)/usr/lib
  102. $(CP) $(WRKINST)/usr/lib/libcom_err.so* \
  103. $(IDIR_LIBCOM_ERR)/usr/lib
  104. libss-install:
  105. $(INSTALL_DIR) $(IDIR_LIBSS)/usr/lib
  106. $(CP) $(WRKINST)/usr/lib/libss.so* \
  107. $(IDIR_LIBSS)/usr/lib
  108. e2fsck-static-install:
  109. ${MAKE} -C ${WRKBUILD}/e2fsck e2fsck.static
  110. ${INSTALL_DIR} ${IDIR_E2FSCK_STATIC}/usr/sbin
  111. ${INSTALL_BIN} ${WRKBUILD}/e2fsck/e2fsck.static \
  112. ${IDIR_E2FSCK_STATIC}/usr/sbin/e2fsck
  113. tune2fs-static-install:
  114. ${MAKE} -C ${WRKBUILD}/misc tune2fs.static
  115. ${INSTALL_DIR} ${IDIR_TUNE2FS_STATIC}/usr/sbin
  116. ${INSTALL_BIN} ${WRKBUILD}/misc/tune2fs.static \
  117. ${IDIR_TUNE2FS_STATIC}/usr/sbin/tune2fs
  118. include $(ADK_TOPDIR)/mk/host-bottom.mk
  119. include $(ADK_TOPDIR)/mk/pkg-bottom.mk