summaryrefslogtreecommitdiffstats
path: root/package/dosfstools
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2009-06-18 13:29:02 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2009-07-27 17:55:34 +0200
commitf26acf61ebf73ad0bfe276fcc9396fd26bb0aad6 (patch)
tree2207dec7592ee22dc18fc26a0fd8d5c9c1797f04 /package/dosfstools
parent76dade1788965d0d31e57d080854dddb5e74783f (diff)
downloadbuildroot-novena-f26acf61ebf73ad0bfe276fcc9396fd26bb0aad6.tar.gz
buildroot-novena-f26acf61ebf73ad0bfe276fcc9396fd26bb0aad6.zip
package: replace mkdosfs with dosfstools
Closes #451 Move from old unmaintained dosfstools-2.11 (packaged as mkdosfs) to now maintained dosfstools-3.0.3. Allow each binary to be installed independently. Signed-off-by: Mike Crowe <mac@mcrowe.com> Tested-by: Will Newton <will.newton@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/dosfstools')
-rw-r--r--package/dosfstools/Config.in24
-rw-r--r--package/dosfstools/dosfstools.mk73
2 files changed, 97 insertions, 0 deletions
diff --git a/package/dosfstools/Config.in b/package/dosfstools/Config.in
new file mode 100644
index 000000000..4906fff86
--- /dev/null
+++ b/package/dosfstools/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_DOSFSTOOLS
+ bool "dosfstools"
+ help
+ Tools for creating and checking DOS FAT filesystems.
+
+ http://www.daniel-baumann.ch/software/dosfstools/
+
+config BR2_PACKAGE_DOSFSTOOLS_MKDOSFS
+ bool "mkdosfs"
+ depends on BR2_PACKAGE_DOSFSTOOLS
+ help
+ Creates a DOS FAT filesystem on a device.
+
+config BR2_PACKAGE_DOSFSTOOLS_DOSFSCK
+ bool "dosfsck"
+ depends on BR2_PACKAGE_DOSFSTOOLS
+ help
+ Checks a DOS FAT filesystem.
+
+config BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL
+ bool "dosfslabel"
+ depends on BR2_PACKAGE_DOSFSTOOLS
+ help
+ Get or set the DOS FAT filesystem label.
diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk
new file mode 100644
index 000000000..a88ab3ddf
--- /dev/null
+++ b/package/dosfstools/dosfstools.mk
@@ -0,0 +1,73 @@
+#############################################################
+#
+# dosfstools
+#
+#############################################################
+DOSFSTOOLS_VERSION:=3.0.3
+DOSFSTOOLS_SOURCE:=dosfstools-$(DOSFSTOOLS_VERSION).tar.gz
+DOSFSTOOLS_SITE:=http://www.daniel-baumann.ch/software/dosfstools
+DOSFSTOOLS_DIR:=$(BUILD_DIR)/dosfstools-$(DOSFSTOOLS_VERSION)
+DOSFSTOOLS_CAT:=$(ZCAT)
+MKDOSFS_BINARY:=mkdosfs
+MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
+DOSFSCK_BINARY:=dosfsck
+DOSFSCK_TARGET_BINARY:=sbin/dosfsck
+DOSFSLABEL_BINARY:=dosfslabel
+DOSFSLABEL_TARGET_BINARY:=sbin/dosfslabel
+
+$(DL_DIR)/$(DOSFSTOOLS_SOURCE):
+ $(call DOWNLOAD,$(DOSFSTOOLS_SITE),$(DOSFSTOOLS_SOURCE))
+
+dosfstools-source: $(DL_DIR)/$(DOSFSTOOLS_SOURCE)
+
+$(DOSFSTOOLS_DIR)/.unpacked: $(DL_DIR)/$(DOSFSTOOLS_SOURCE) $(wildcard local/dosfstools/dosfstools*.patch)
+ $(DOSFSTOOLS_CAT) $(DL_DIR)/$(DOSFSTOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(DOSFSTOOLS_DIR) package/dosfstools/ dosfstools\*.patch
+ touch $(DOSFSTOOLS_DIR)/.unpacked
+
+$(DOSFSTOOLS_DIR)/.built : $(DOSFSTOOLS_DIR)/.unpacked
+ $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(DOSFSTOOLS_DIR)
+ $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY)
+ $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY)
+ $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY)
+ touch $@
+
+$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
+ cp -a $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY) $@
+ touch -c $@
+
+$(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
+ cp -a $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY) $@
+ touch -c $@
+
+$(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
+ cp -a $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY) $@
+ touch -c $@
+
+dosfstools: uclibc $(TARGET_DIR)/$(DOSFSTOOLS_TARGET_BINARY) $(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
+
+dosfstools-clean:
+ rm -f $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
+ -$(MAKE) -C $(DOSFSTOOLS_DIR) clean
+
+dosfstools-dirclean:
+ rm -rf $(DOSFSTOOLS_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKDOSFS),y)
+TARGETS+=$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
+endif
+
+ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSCK),y)
+TARGETS+=$(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
+endif
+
+ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL),y)
+TARGETS+=$(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
+endif