xref: /OK3568_Linux_fs/buildroot/package/dosfstools/dosfstools.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# dosfstools
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunDOSFSTOOLS_VERSION = 4.2
8*4882a593SmuzhiyunDOSFSTOOLS_SITE = https://github.com/dosfstools/dosfstools/releases/download/v$(DOSFSTOOLS_VERSION)
9*4882a593SmuzhiyunDOSFSTOOLS_LICENSE = GPL-3.0+
10*4882a593SmuzhiyunDOSFSTOOLS_LICENSE_FILES = COPYING
11*4882a593SmuzhiyunDOSFSTOOLS_CPE_ID_VENDOR = dosfstools_project
12*4882a593SmuzhiyunDOSFSTOOLS_CONF_OPTS = --enable-compat-symlinks --exec-prefix=/
13*4882a593SmuzhiyunHOST_DOSFSTOOLS_CONF_OPTS = --enable-compat-symlinks
14*4882a593Smuzhiyun
15*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_UDEV),y)
16*4882a593SmuzhiyunDOSFSTOOLS_CONF_OPTS += --with-udev
17*4882a593SmuzhiyunDOSFSTOOLS_DEPENDENCIES += udev
18*4882a593Smuzhiyunelse
19*4882a593SmuzhiyunDOSFSTOOLS_CONF_OPTS += --without-udev
20*4882a593Smuzhiyunendif
21*4882a593Smuzhiyun
22*4882a593Smuzhiyunifneq ($(BR2_ENABLE_LOCALE),y)
23*4882a593SmuzhiyunDOSFSTOOLS_CONF_OPTS += LIBS="-liconv"
24*4882a593SmuzhiyunDOSFSTOOLS_DEPENDENCIES += libiconv
25*4882a593Smuzhiyunendif
26*4882a593Smuzhiyun
27*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_DOSFSTOOLS_FATLABEL),y)
28*4882a593Smuzhiyundefine DOSFSTOOLS_INSTALL_FATLABEL
29*4882a593Smuzhiyun	$(INSTALL) -D -m 0755 $(@D)/src/fatlabel $(TARGET_DIR)/sbin/fatlabel
30*4882a593Smuzhiyun	ln -sf fatlabel $(TARGET_DIR)/sbin/dosfslabel
31*4882a593Smuzhiyunendef
32*4882a593Smuzhiyunendif
33*4882a593Smuzhiyun
34*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT),y)
35*4882a593Smuzhiyundefine DOSFSTOOLS_INSTALL_FSCK_FAT
36*4882a593Smuzhiyun	$(INSTALL) -D -m 0755 $(@D)/src/fsck.fat $(TARGET_DIR)/sbin/fsck.fat
37*4882a593Smuzhiyun	ln -sf fsck.fat $(TARGET_DIR)/sbin/fsck.vfat
38*4882a593Smuzhiyun	ln -sf fsck.fat $(TARGET_DIR)/sbin/fsck.msdos
39*4882a593Smuzhiyun	ln -sf fsck.fat $(TARGET_DIR)/sbin/dosfsck
40*4882a593Smuzhiyunendef
41*4882a593Smuzhiyunendif
42*4882a593Smuzhiyun
43*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT),y)
44*4882a593Smuzhiyundefine DOSFSTOOLS_INSTALL_MKFS_FAT
45*4882a593Smuzhiyun	$(INSTALL) -D -m 0755 $(@D)/src/mkfs.fat $(TARGET_DIR)/sbin/mkfs.fat
46*4882a593Smuzhiyun	ln -sf mkfs.fat $(TARGET_DIR)/sbin/mkdosfs
47*4882a593Smuzhiyun	ln -sf mkfs.fat $(TARGET_DIR)/sbin/mkfs.msdos
48*4882a593Smuzhiyun	ln -sf mkfs.fat $(TARGET_DIR)/sbin/mkfs.vfat
49*4882a593Smuzhiyunendef
50*4882a593Smuzhiyunendif
51*4882a593Smuzhiyun
52*4882a593Smuzhiyundefine DOSFSTOOLS_INSTALL_TARGET_CMDS
53*4882a593Smuzhiyun	$(call DOSFSTOOLS_INSTALL_FATLABEL)
54*4882a593Smuzhiyun	$(call DOSFSTOOLS_INSTALL_FSCK_FAT)
55*4882a593Smuzhiyun	$(call DOSFSTOOLS_INSTALL_MKFS_FAT)
56*4882a593Smuzhiyunendef
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun$(eval $(autotools-package))
59*4882a593Smuzhiyun$(eval $(host-autotools-package))
60