dosfstool: change download mirror (#12285)
[openwrt/svn-archive/archive.git] / utils / dosfstools / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dosfstools
11 PKG_VERSION:=3.0.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://fossies.org/linux/misc
16 PKG_MD5SUM:=4c1f1e72b82371704f93ebdd3c7b6259
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/dosfstools/Default
21 SECTION:=utils
22 CATEGORY:=Utilities
23 URL:=http://www.daniel-baumann.ch/software/dosfstools/
24 SUBMENU:=Filesystem
25 endef
26
27 define Package/dosfsck
28 $(call Package/dosfstools/Default)
29 TITLE:=dosfsck
30 endef
31
32 define Package/dosfslabel
33 $(call Package/dosfstools/Default)
34 TITLE:=dosfslabel
35 endef
36
37 define Package/mkdosfs
38 $(call Package/dosfstools/Default)
39 TITLE:=mkdosfs
40 endef
41
42 define Package/dosfsck/description
43 Utilities to create and check MS-DOS FAT filesystems.
44 (fsck.vfat and fsck.msdos for checking integrity of FAT volumes)
45 endef
46
47 define Package/dosfslabel/description
48 Utilities to create and check MS-DOS FAT filesystems.
49 (dosfslabel for reading and writing labels of FAT volumes)
50 endef
51
52 define Package/mkdosfs/description
53 Utilities to create and check MS-DOS FAT filesystems.
54 (mkfs.vfat and mkfs.msdos for creating FAT volumes)
55 endef
56
57 define Build/Configure
58 endef
59
60 define Build/Compile
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 $(TARGET_CONFIGURE_OPTS) \
63 OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
64 PREFIX="/usr" \
65 SBINDIR="/usr/sbin" \
66 all
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 $(TARGET_CONFIGURE_OPTS) \
69 OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
70 PREFIX="$(PKG_INSTALL_DIR)/usr" \
71 SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin" \
72 install-bin
73 endef
74
75 define Package/dosfsck/install
76 $(INSTALL_DIR) $(1)/lib/functions/fsck
77 $(INSTALL_DATA) ./files/dosfsck.sh $(1)/lib/functions/fsck/
78 $(INSTALL_DIR) $(1)/usr/sbin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfsck $(1)/usr/sbin/
80 (cd $(1)/usr/sbin; ln -sf dosfsck fsck.msdos; ln -sf dosfsck fsck.vfat)
81 endef
82
83 define Package/dosfslabel/install
84 $(INSTALL_DIR) $(1)/usr/sbin
85 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfslabel $(1)/usr/sbin/
86 endef
87
88 define Package/mkdosfs/install
89 $(INSTALL_DIR) $(1)/usr/sbin
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkdosfs $(1)/usr/sbin/
91 (cd $(1)/usr/sbin; ln -sf mkdosfs mkfs.msdos; ln -sf mkdosfs mkfs.vfat)
92 endef
93
94 $(eval $(call BuildPackage,dosfsck))
95 $(eval $(call BuildPackage,dosfslabel))
96 $(eval $(call BuildPackage,mkdosfs))