diff options
author | Maxim Mikityanskiy <maxtram95@gmail.com> | 2015-01-19 18:14:06 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-03-08 23:02:16 +0100 |
commit | cef6a787cad4d5417b8672c8fd4c200bf29655ac (patch) | |
tree | 84542daad03bf2d61787a66ea8d468c28856e86e /package | |
parent | 9be52effc47acf9db9c5183c866bc2cd5dafb58d (diff) | |
download | buildroot-cef6a787cad4d5417b8672c8fd4c200bf29655ac.tar.gz buildroot-cef6a787cad4d5417b8672c8fd4c200bf29655ac.zip |
package/dosfstools: add missing symlinks
Install alternative symlinks for dosfstools mkfs.fat, fsck.fat and
fatlabel. Those symlinks are generally installed by make install, but
buildroot does not use make install for dosfstools, but symlinks should
be installed anyway.
[Thomas: rewrite the installation logic to use make style code rather
than shell code.]
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/dosfstools/dosfstools.mk | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk index a9d8392c8c..88c4fe806f 100644 --- a/package/dosfstools/dosfstools.mk +++ b/package/dosfstools/dosfstools.mk @@ -20,23 +20,40 @@ DOSFSTOOLS_DEPENDENCIES += libiconv DOSFSTOOLS_LDLIBS += -liconv endif -FATLABEL_BINARY = fatlabel -FSCK_FAT_BINARY = fsck.fat -MKFS_FAT_BINARY = mkfs.fat - define DOSFSTOOLS_BUILD_CMDS $(MAKE) $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(DOSFSTOOLS_CFLAGS)" LDLIBS="$(DOSFSTOOLS_LDLIBS)" -C $(@D) endef -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_FATLABEL)+=$(FATLABEL_BINARY) -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT)+=$(FSCK_FAT_BINARY) -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT)+=$(MKFS_FAT_BINARY) +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FATLABEL),y) +define DOSFSTOOLS_INSTALL_FATLABEL + $(INSTALL) -D -m 755 $(@D)/fatlabel $(TARGET_DIR)/sbin/fatlabel + ln -sf fatlabel $(TARGET_DIR)/sbin/dosfslabel +endef +endif + +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT),y) +define DOSFSTOOLS_INSTALL_FSCK_FAT + $(INSTALL) -D -m 755 $(@D)/fsck.fat $(TARGET_DIR)/sbin/fsck.fat + ln -fs fsck.fat $(TARGET_DIR)/sbin/dosfsck + ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.msdos + ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.vfat +endef +endif + +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT),y) +define DOSFSTOOLS_INSTALL_MKFS_FAT + $(INSTALL) -D -m 755 $(@D)/mkfs.fat $(TARGET_DIR)/sbin/mkfs.fat + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkdosfs + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.msdos + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.vfat +endef +endif define DOSFSTOOLS_INSTALL_TARGET_CMDS - test -z "$(DOSFSTOOLS_INSTALL_BIN_FILES_y)" || \ - $(INSTALL) -m 755 $(addprefix $(@D)/,$(DOSFSTOOLS_INSTALL_BIN_FILES_y)) \ - $(TARGET_DIR)/sbin/ + $(DOSFSTOOLS_INSTALL_FATLABEL) + $(DOSFSTOOLS_INSTALL_FSCK_FAT) + $(DOSFSTOOLS_INSTALL_MKFS_FAT) endef define HOST_DOSFSTOOLS_BUILD_CMDS |