package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / dosfstools / dosfstools.mk
blobb7f7d96b8572bd7f5a4fc0d945c7ea9fd13b87c8
1 ################################################################################
3 # dosfstools
5 ################################################################################
7 DOSFSTOOLS_VERSION = 3.0.28
8 DOSFSTOOLS_SOURCE = dosfstools-$(DOSFSTOOLS_VERSION).tar.xz
9 DOSFSTOOLS_SITE = https://github.com/dosfstools/dosfstools/releases/download/v$(DOSFSTOOLS_VERSION)
10 DOSFSTOOLS_LICENSE = GPLv3+
11 DOSFSTOOLS_LICENSE_FILES = COPYING
13 # Avoid target dosfstools dependencies, no host-libiconv
14 HOST_DOSFSTOOLS_DEPENDENCIES =
16 DOSFSTOOLS_CFLAGS = $(TARGET_CFLAGS) -D_GNU_SOURCE
18 ifneq ($(BR2_ENABLE_LOCALE),y)
19 DOSFSTOOLS_DEPENDENCIES += libiconv
20 DOSFSTOOLS_LDLIBS += -liconv
21 endif
23 define DOSFSTOOLS_BUILD_CMDS
24 $(MAKE) $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(DOSFSTOOLS_CFLAGS)" LDLIBS="$(DOSFSTOOLS_LDLIBS)" -C $(@D)
26 endef
28 ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FATLABEL),y)
29 define DOSFSTOOLS_INSTALL_FATLABEL
30 $(INSTALL) -D -m 755 $(@D)/fatlabel $(TARGET_DIR)/sbin/fatlabel
31 ln -sf fatlabel $(TARGET_DIR)/sbin/dosfslabel
32 endef
33 endif
35 ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT),y)
36 define DOSFSTOOLS_INSTALL_FSCK_FAT
37 $(INSTALL) -D -m 755 $(@D)/fsck.fat $(TARGET_DIR)/sbin/fsck.fat
38 ln -fs fsck.fat $(TARGET_DIR)/sbin/dosfsck
39 ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.msdos
40 ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.vfat
41 endef
42 endif
44 ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT),y)
45 define DOSFSTOOLS_INSTALL_MKFS_FAT
46 $(INSTALL) -D -m 755 $(@D)/mkfs.fat $(TARGET_DIR)/sbin/mkfs.fat
47 ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkdosfs
48 ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.msdos
49 ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.vfat
50 endef
51 endif
53 define DOSFSTOOLS_INSTALL_TARGET_CMDS
54 $(DOSFSTOOLS_INSTALL_FATLABEL)
55 $(DOSFSTOOLS_INSTALL_FSCK_FAT)
56 $(DOSFSTOOLS_INSTALL_MKFS_FAT)
57 endef
59 define HOST_DOSFSTOOLS_BUILD_CMDS
60 $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
61 endef
63 define HOST_DOSFSTOOLS_INSTALL_CMDS
64 $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr install
65 endef
67 $(eval $(generic-package))
68 $(eval $(host-generic-package))