2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_LICENSE_FILES
:=COPYING
17 PKG_MAINTAINER
:=David Bonnes
<david.bonnes@gmail.com
>
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
20 PKG_SOURCE_URL
:=https
://github.com
/dosfstools
/dosfstools
/releases
/download
/v
$(PKG_VERSION
)/ \
21 http
://fossies.org
/linux
/misc
22 PKG_MD5SUM
:=64e3b3a59b51d2a97d7ac38b23a124bb
24 include $(INCLUDE_DIR
)/package.mk
25 include $(INCLUDE_DIR
)/nls.mk
27 define Package
/dosfstools
/Default
30 URL
:=https
://github.com
/dosfstools
32 DEPENDS
:=$(ICONV_DEPENDS
)
35 define Package
/dosfsck
36 $(call Package
/dosfstools
/Default
)
37 TITLE
:=fsck
(fsck.fat
) utility from dosfstools
40 define Package
/dosfslabel
41 $(call Package
/dosfstools
/Default
)
42 TITLE
:=fslabel
(fatlabel
) utility from dosfstools
45 define Package
/mkdosfs
46 $(call Package
/dosfstools
/Default
)
47 TITLE
:=mkfs
(mkfs.fat
) utility from dosfstools
50 define Package
/dosfsck
/description
51 Utilities to create and
check MS-DOS FAT filesystems.
52 (fsck.vfat and fsck.fat for checking integrity of FAT volumes
)
55 define Package
/dosfslabel
/description
56 Utilities to create and
check MS-DOS FAT filesystems.
57 (fatlabel for reading and writing labels of FAT volumes
)
60 define Package
/mkdosfs
/description
61 Utilities to create and
check MS-DOS FAT filesystems.
62 (mkfs.vfat and mkfs.fat for creating FAT volumes
)
65 LDFLAGS
+=$(ICONV_LDFLAGS
)
68 define Build
/Configure
72 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
73 $(TARGET_CONFIGURE_OPTS
) \
74 OPTFLAGS
="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE" \
77 LDFLAGS
="$(LDFLAGS)" \
80 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
81 $(TARGET_CONFIGURE_OPTS
) \
82 OPTFLAGS
="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
83 PREFIX
="$(PKG_INSTALL_DIR)/usr" \
84 SBINDIR
="$(PKG_INSTALL_DIR)/usr/sbin" \
88 define Package
/dosfsck
/install
89 $(INSTALL_DIR
) $(1)/lib
/functions
/fsck
90 $(INSTALL_DATA
) .
/files
/dosfsck.sh
$(1)/lib
/functions
/fsck
/
91 $(INSTALL_DIR
) $(1)/usr
/sbin
92 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/fsck.fat
$(1)/usr
/sbin
/
93 (cd
$(1)/usr
/sbin
; ln
-sf fsck.fat fsck.msdos
; ln
-sf fsck.fat fsck.vfat
; ln
-sf fsck.fat dosfsck
)
96 define Package
/dosfslabel
/install
97 $(INSTALL_DIR
) $(1)/usr
/sbin
98 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/fatlabel
$(1)/usr
/sbin
/
101 define Package
/mkdosfs
/install
102 $(INSTALL_DIR
) $(1)/usr
/sbin
103 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/mkfs.fat
$(1)/usr
/sbin
/
104 (cd
$(1)/usr
/sbin
; ln
-sf mkfs.fat mkfs.msdos
; ln
-sf mkfs.fat mkfs.vfat
)
107 $(eval
$(call BuildPackage
,dosfsck
))
108 $(eval
$(call BuildPackage
,dosfslabel
))
109 $(eval
$(call BuildPackage
,mkdosfs
))