Ticket #12285: Makefile

File Makefile, 2.4 KB (added by coderjoe@…, 5 years ago)

dosfstools/Makefile - updated with fossies.org URL

Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=dosfstools
11PKG_VERSION:=3.0.12
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://fossies.org/linux/misc/
16PKG_MD5SUM:=4c1f1e72b82371704f93ebdd3c7b6259
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/dosfstools/Default
21  SECTION:=utils
22  CATEGORY:=Utilities
23  URL:=http://www.daniel-baumann.ch/software/dosfstools/
24  SUBMENU:=Filesystem
25endef
26
27define Package/dosfsck
28  $(call Package/dosfstools/Default)
29  TITLE:=dosfsck
30endef
31
32define Package/dosfslabel
33  $(call Package/dosfstools/Default)
34  TITLE:=dosfslabel
35endef
36
37define Package/mkdosfs
38  $(call Package/dosfstools/Default)
39  TITLE:=mkdosfs
40endef
41
42define 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)
45endef
46
47define Package/dosfslabel/description
48        Utilities to create and check MS-DOS FAT filesystems.
49        (dosfslabel for reading and writing labels of FAT volumes)
50endef
51
52define Package/mkdosfs/description
53        Utilities to create and check MS-DOS FAT filesystems.
54        (mkfs.vfat and mkfs.msdos for creating FAT volumes)
55endef
56
57define Build/Configure
58endef
59
60define 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
73endef
74
75define 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)
81endef
82
83define Package/dosfslabel/install
84        $(INSTALL_DIR) $(1)/usr/sbin
85        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfslabel $(1)/usr/sbin/
86endef
87
88define 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)
92endef
93
94$(eval $(call BuildPackage,dosfsck))
95$(eval $(call BuildPackage,dosfslabel))
96$(eval $(call BuildPackage,mkdosfs))