port dosfstools to buildroot-ng
[openwrt/svn-archive/archive.git] / utils / dosfstools / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dosfstools
12 PKG_VERSION:=2.11
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_MD5SUM:=407d405ade410f7597d364ab5dc8c9f6
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz
18 PKG_SOURCE_URL:=ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/dosfstools
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=MS-DOS FAT filesystems utilities
29 DESCRIPTION:=MS-DOS FAT filesystems utilities.\\\
30 Utilities to create and check MS-DOS FAT filesystems.
31 URL:=ftp://ftp.uni-erlangen.de:/pub/Linux/LOCAL/dosfstools/
32 endef
33
34 define Build/Configure
35 endef
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 $(TARGET_CONFIGURE_OPTS) \
42 OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
43 PREFIX="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Package/dosfstools/install
48 install -d -m0755 $(1)/sbin
49 $(CP) $(PKG_INSTALL_DIR)/sbin/dosfsck $(1)/sbin/
50 $(CP) $(PKG_INSTALL_DIR)/sbin/fsck.{msdos,vfat} $(1)/sbin/
51 $(CP) $(PKG_INSTALL_DIR)/sbin/mkdosfs $(1)/sbin/
52 $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.{msdos,vfat} $(1)/sbin/
53 endef
54
55 $(eval $(call BuildPackage,dosfstools))