2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
10 PKG_RELEASE
:=$(AUTORELEASE
)
12 PKG_SOURCE
:=$(PKG_NAME
)_ntfsprogs-
$(PKG_VERSION
).tgz
13 PKG_SOURCE_URL
:=https
://www.tuxera.com
/opensource
/
14 PKG_HASH
:=0489fbb6972581e1b417ab578d543f6ae522e7fa648c3c9b49c789510fd5eb93
16 PKG_MAINTAINER
:=Ted Hess
<thess@kitschensync.net
>
17 PKG_LICENSE
:=GPL-2.0
-only LGPL-2.1
-or-later
18 PKG_LICENSE_FILES
:=COPYING COPYING.LIB
19 PKG_CPE_ID
:=cpe
:/a
:ntfs-3g
:ntfs-3g
25 # release contains fuseext/int hint
26 PKG_RELEASE
:=$(PKG_RELEASE
)$(if
$(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
),-fuseext
,-fuseint
)
28 # define build dir, respect fuseext/int
29 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/ntfs-3g
/common
36 URL
:=https
://www.tuxera.com
38 TITLE
:=Stable Read
/Write NTFS Driver
41 define Package
/ntfs-3g
42 $(call Package
/ntfs-3g
/common
)
43 DEPENDS
+= +kmod-fuse
+PACKAGE_NTFS-3G_USE_LIBFUSE
:libfuse
+libpthread
46 define Package
/ntfs-3g
/description
47 Ntfs-3g is a NTFS driver
, which can create
, remove
, rename
,
48 move files
, directories
, hard links
, and streams. It can read
49 and write files
, including streams and sparse files. It can
50 handle special files like symbolic links
, devices
, and FIFOs.
51 Moreover it can also read transparently compressed files.
56 - mount.ntfs-3g
(symlink to ntfs-3g
)
60 define Package
/ntfs-3g
/config
61 config PACKAGE_NTFS-3G_USE_LIBFUSE
62 bool
"use external FUSE library, selects package libfuse"
63 depends on PACKAGE_ntfs-3g
65 Ntfs-3g by default uses a minimalized lite version of FUSE.
66 If libfuse is part of your filesystem anyway
(because of sshfs
, owfs
67 etc.
) it makes sense to activate this option and save some kilobytes
70 config PACKAGE_NTFS-3G_HAS_PROBE
71 bool
"install the ntfs-3g.probe utility"
72 depends on PACKAGE_ntfs-3g
76 define Package
/ntfs-3g-low
77 $(call Package
/ntfs-3g
/common
)
78 TITLE
:=lowntfs-3g
(alternative using the fuse low-level interface
)
82 define Package
/ntfs-3g-low
/description
85 - mount.lowntfs-3g
(symlink to lowntfs-3g
)
87 A driver variant using the fuse low-level interface missing some of the
88 enhanced functionality for streams or the like. You might want to
check:
89 http
://www.tuxera.com
/community
/ntfs-3g-manual
/
94 define Package
/ntfs-3g-utils
/description
95 Suite of NTFS utilities for doing neat things with NTFS.
97 - mkntfs
- Create an NTFS filesystem.
98 - ntfscat
- Dump a file
's content to the standard output.
99 - ntfsclone - Efficiently clone, backup, restore or rescue NTFS.
100 - ntfscluster - Locate the files which use the given sectors or clusters.
101 - ntfscmp - Compare two NTFS filesystems and tell the differences.
102 - ntfscp - Copy a file to an NTFS volume.
103 - ntfssecaudit - Display ownership and permissions, check consistency
104 - ntfsfix - Check and fix some common errors, clear the LogFile.
105 - ntfsinfo - Show information about NTFS or one of the files or directories within it.
106 - ntfslabel - Show, or set, an NTFS filesystem's volume label.
107 - ntfsls
- List information about files in a directory residing on an NTFS.
108 - ntfsresize
- Resize NTFS without losing data.
109 - ntfsundelete
- Recover deleted files from NTFS.
110 - ntfsusermap
- Define mapping of Windows accounts to Linux logins
113 define Package
/ntfs-3g-utils
114 $(call Package
/ntfs-3g
/common
)
115 TITLE
:=ntfs-3g utilities
116 DEPENDS
+= +ntfs-3g
+libgcrypt
+libuuid
124 # configure/make according selection
125 ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
126 CONFIGURE_ARGS
+= --with-fuse
=external
127 TARGET_CPPFLAGS
:=-I
$(STAGING_DIR
)/usr
/include/fuse
$(TARGET_CPPFLAGS
)
129 CONFIGURE_ARGS
+= --with-fuse
=internal
130 TARGET_CPPFLAGS
:=-I..
/include/fuse-lite
$(TARGET_CPPFLAGS
)
133 # enable ntfsprogs and extras
134 ifneq ($(CONFIG_PACKAGE_ntfs-3g-utils
)$(SDK
)$(DEVELOPER
),)
135 CONFIGURE_ARGS
+= --enable-ntfsprogs
--enable-extras
137 CONFIGURE_ARGS
+= --disable-ntfsprogs
--disable-extras
140 # redefine prepare to extract to our build dir
143 rm -rf
$(PKG_BUILD_DIR
)/
144 mkdir
-p
$(PKG_BUILD_DIR
)/
145 $(TAR
) -xzf
$(DL_DIR
)/$(PKG_SOURCE
) -C
$(PKG_BUILD_DIR
) --strip 1
149 define Build
/InstallDev
150 $(INSTALL_DIR
) $(1)/usr
/include
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ntfs-3g
$(1)/usr
/include/
152 $(INSTALL_DIR
) $(1)/usr
/lib
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.
{la
,a
,so
*} $(1)/usr
/lib
/
156 define Package
/ntfs-3g
/install
157 $(INSTALL_DIR
) $(1)/usr
/bin
158 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ntfs-3g
$(1)/usr
/bin
/
159 $(if
$(CONFIG_PACKAGE_NTFS-3G_HAS_PROBE
),$(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ntfs-3g.probe
$(1)/usr
/bin
/,)
160 $(INSTALL_DIR
) $(1)/usr
/lib
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.so.
* $(1)/usr
/lib
/
162 $(INSTALL_DIR
) $(1)/sbin
163 $(LN
) ..
/usr
/bin
/ntfs-3g
$(1)/sbin
/mount.ntfs-3g
166 define Package
/ntfs-3g
/postinst
168 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
171 if
! [ -f
'/etc/filesystems' ]; then
172 echo
"Create '$$FILE'."
176 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
177 echo
"Add '$$ID' to known filesystems."
178 echo
"$$ID" >> "$$FILE"
183 define Package
/ntfs-3g-low
/install
184 $(INSTALL_DIR
) $(1)/usr
/bin
185 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lowntfs-3g
$(1)/usr
/bin
/
186 $(INSTALL_DIR
) $(1)/sbin
187 $(LN
) ..
/usr
/bin
/lowntfs-3g
$(1)/sbin
/mount.lowntfs-3g
190 define Package
/ntfs-3g-low
/postinst
192 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
195 if
! [ -f
'/etc/filesystems' ]; then
196 echo
"Create '$$FILE'."
200 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
201 echo
"Add '$$ID' to known filesystems."
202 echo
"$$ID" >> "$$FILE"
207 define Package
/ntfs-3g-utils
/install
208 rm -f
$(PKG_INSTALL_DIR
)/usr
/sbin
/mkfs.ntfs
209 $(INSTALL_DIR
) $(1)/usr
/{bin
,sbin
}
210 $(FIND
) $(PKG_INSTALL_DIR
)/usr
/bin
/ -type f
! -regex
'.*[^/]*ntfs-3g[^/]*' -exec
$(INSTALL_BIN
) {} $(1)/usr
/bin
/ \
;
211 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
212 $(LN
) mkntfs
$(1)/usr
/sbin
/mkfs.ntfs
215 $(eval
$(call BuildPackage
,ntfs-3g
))
216 $(eval
$(call BuildPackage
,ntfs-3g-low
))
217 $(eval
$(call BuildPackage
,ntfs-3g-utils
))