You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=dosfstools
  9. PKG_VERSION:=3.0.27
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-3.0+
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_MAINTAINER:=David Bonnes <david.bonnes@gmail.com>
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://daniel-baumann.ch/files/software/dosfstools \
  16. http://fossies.org/linux/misc
  17. PKG_MD5SUM:=2e31e7bdf92998e41ed17de505a4a552
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/dosfstools/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. URL:=http://www.daniel-baumann.ch/software/dosfstools/
  24. SUBMENU:=Filesystem
  25. DEPENDS:=$(ICONV_DEPENDS)
  26. endef
  27. define Package/dosfsck
  28. $(call Package/dosfstools/Default)
  29. TITLE:=fsck (fsck.fat) utility from dosfstools
  30. endef
  31. define Package/dosfslabel
  32. $(call Package/dosfstools/Default)
  33. TITLE:=fslabel (fatlabel) utility from dosfstools
  34. endef
  35. define Package/mkdosfs
  36. $(call Package/dosfstools/Default)
  37. TITLE:=mkfs (mkfs.fat) utility from dosfstools
  38. endef
  39. define Package/dosfsck/description
  40. Utilities to create and check MS-DOS FAT filesystems.
  41. (fsck.vfat and fsck.fat for checking integrity of FAT volumes)
  42. endef
  43. define Package/dosfslabel/description
  44. Utilities to create and check MS-DOS FAT filesystems.
  45. (fatlabel for reading and writing labels of FAT volumes)
  46. endef
  47. define Package/mkdosfs/description
  48. Utilities to create and check MS-DOS FAT filesystems.
  49. (mkfs.vfat and mkfs.fat for creating FAT volumes)
  50. endef
  51. LDFLAGS+=$(ICONV_LDFLAGS)
  52. LDLIBS+=-liconv
  53. define Build/Configure
  54. endef
  55. define Build/Compile
  56. $(MAKE) -C $(PKG_BUILD_DIR) \
  57. $(TARGET_CONFIGURE_OPTS) \
  58. OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE" \
  59. PREFIX="/usr" \
  60. SBINDIR="/usr/sbin" \
  61. LDFLAGS="$(LDFLAGS)" \
  62. LDLIBS="$(LDLIBS)" \
  63. all
  64. $(MAKE) -C $(PKG_BUILD_DIR) \
  65. $(TARGET_CONFIGURE_OPTS) \
  66. OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
  67. PREFIX="$(PKG_INSTALL_DIR)/usr" \
  68. SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin" \
  69. install-bin
  70. endef
  71. define Package/dosfsck/install
  72. $(INSTALL_DIR) $(1)/lib/functions/fsck
  73. $(INSTALL_DATA) ./files/dosfsck.sh $(1)/lib/functions/fsck/
  74. $(INSTALL_DIR) $(1)/usr/sbin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.fat $(1)/usr/sbin/
  76. (cd $(1)/usr/sbin; ln -sf fsck.fat fsck.msdos; ln -sf fsck.fat fsck.vfat; ln -sf fsck.fat dosfsck)
  77. endef
  78. define Package/dosfslabel/install
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fatlabel $(1)/usr/sbin/
  81. endef
  82. define Package/mkdosfs/install
  83. $(INSTALL_DIR) $(1)/usr/sbin
  84. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.fat $(1)/usr/sbin/
  85. (cd $(1)/usr/sbin; ln -sf mkfs.fat mkfs.msdos; ln -sf mkfs.fat mkfs.vfat)
  86. endef
  87. $(eval $(call BuildPackage,dosfsck))
  88. $(eval $(call BuildPackage,dosfslabel))
  89. $(eval $(call BuildPackage,mkdosfs))