2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2017.3.23
12 PKG_SOURCE
:=$(PKG_NAME
)_ntfsprogs-
$(PKG_VERSION
).tgz
13 PKG_SOURCE_URL
:=https
://www.tuxera.com
/opensource
/
14 PKG_HASH
:=3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5
16 PKG_LICENSE
:=GPL-2.0 LGPL-2.0
17 PKG_LICENSE_FILES
:=COPYING COPYING.LIB
19 PKG_MAINTAINER
:=Ted Hess
<thess@kitschensync.net
>
24 # release contains fuseext/int hint
25 PKG_RELEASE
:=$(PKG_RELEASE
)$(if
$(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
),-fuseext
,-fuseint
)
27 # define build dir, respect fuseext/int
28 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/ntfs-3g
/common
35 URL
:=http
://www.tuxera.com
37 TITLE
:=Stable Read
/Write NTFS Driver
40 define Package
/ntfs-3g
41 $(call Package
/ntfs-3g
/common
)
42 DEPENDS
+= +kmod-fuse
+PACKAGE_NTFS-3G_USE_LIBFUSE
:libfuse
+libpthread
45 define Package
/ntfs-3g
/description
46 Ntfs-3g is a NTFS driver
, which can create
, remove
, rename
,
47 move files
, directories
, hard links
, and streams. It can read
48 and write files
, including streams and sparse files. It can
49 handle special files like symbolic links
, devices
, and FIFOs.
50 Moreover it can also read transparently compressed files.
55 - mount.ntfs-3g
(symlink to ntfs-3g
)
59 define Package
/ntfs-3g
/config
60 config PACKAGE_NTFS-3G_USE_LIBFUSE
61 bool
"use external FUSE library, selects package libfuse"
62 depends on PACKAGE_ntfs-3g
64 Ntfs-3g by default uses a minimalized lite version of FUSE.
65 If libfuse is part of your filesystem anyway
(because of sshfs
, owfs
66 etc.
) it makes sense to activate this option and save some kilobytes
71 define Package
/ntfs-3g-low
72 $(call Package
/ntfs-3g
/common
)
73 TITLE
:=lowntfs-3g
(alternative using the fuse low-level interface
)
77 define Package
/ntfs-3g-low
/description
80 - mount.lowntfs-3g
(symlink to lowntfs-3g
)
82 A driver variant using the fuse low-level interface missing some of the
83 enhanced functionality for streams or the like. You might want to
check:
84 http
://www.tuxera.com
/community
/ntfs-3g-manual
/
89 define Package
/ntfs-3g-utils
/description
90 Suite of NTFS utilities for doing neat things with NTFS.
92 - mkntfs
- Create an NTFS filesystem.
93 - ntfscat
- Dump a file
's content to the standard output.
94 - ntfsclone - Efficiently clone, backup, restore or rescue NTFS.
95 - ntfscluster - Locate the files which use the given sectors or clusters.
96 - ntfscmp - Compare two NTFS filesystems and tell the differences.
97 - ntfscp - Copy a file to an NTFS volume.
98 - ntfssecaudit - Display ownership and permissions, check consistency
99 - ntfsfix - Check and fix some common errors, clear the LogFile.
100 - ntfsinfo - Show information about NTFS or one of the files or directories within it.
101 - ntfslabel - Show, or set, an NTFS filesystem's volume label.
102 - ntfsls
- List information about files in a directory residing on an NTFS.
103 - ntfsresize
- Resize NTFS without losing data.
104 - ntfsundelete
- Recover deleted files from NTFS.
105 - ntfsusermap
- Define mapping of Windows accounts to Linux logins
108 define Package
/ntfs-3g-utils
109 $(call Package
/ntfs-3g
/common
)
110 TITLE
:=ntfs-3g utilities
111 DEPENDS
+= +ntfs-3g
+libgcrypt
+libuuid
119 # configure/make according selection
120 ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
121 CONFIGURE_ARGS
+= --with-fuse
=external
122 TARGET_CPPFLAGS
:=-I
$(STAGING_DIR
)/usr
/include/fuse
$(TARGET_CPPFLAGS
)
124 CONFIGURE_ARGS
+= --with-fuse
=internal
125 TARGET_CPPFLAGS
:=-I..
/include/fuse-lite
$(TARGET_CPPFLAGS
)
128 # enable ntfsprogs and extras
129 ifneq ($(CONFIG_PACKAGE_ntfs-3g-utils
)$(SDK
)$(DEVELOPER
),)
130 CONFIGURE_ARGS
+= --enable-ntfsprogs
--enable-extras
132 CONFIGURE_ARGS
+= --disable-ntfsprogs
--disable-extras
135 # redefine prepare to extract to our build dir
138 rm -rf
$(PKG_BUILD_DIR
)/
139 mkdir
-p
$(PKG_BUILD_DIR
)/
140 $(TAR
) -xzf
$(DL_DIR
)/$(PKG_SOURCE
) -C
$(PKG_BUILD_DIR
) --strip 1
144 define Build
/InstallDev
145 $(INSTALL_DIR
) $(1)/usr
/include
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ntfs-3g
$(1)/usr
/include/
147 $(INSTALL_DIR
) $(1)/usr
/lib
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.
{la
,a
,so
*} $(1)/usr
/lib
/
151 define Package
/ntfs-3g
/install
152 $(INSTALL_DIR
) $(1)/usr
/bin
153 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ntfs-3g
{,.probe
} $(1)/usr
/bin
/
154 $(INSTALL_DIR
) $(1)/usr
/lib
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.so.
* $(1)/usr
/lib
/
156 $(INSTALL_DIR
) $(1)/sbin
157 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mount.ntfs-3g
$(1)/sbin
/
158 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mount.ntfs-3g
$(1)/sbin
/mount.ntfs
161 define Package
/ntfs-3g
/postinst
163 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
166 if
! [ -f
'/etc/filesystems' ]; then
167 echo
"Create '$$FILE'."
171 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
172 echo
"Add '$$ID' to known filesystems."
173 echo
"$$ID" >> "$$FILE"
178 define Package
/ntfs-3g-low
/install
179 $(INSTALL_DIR
) $(1)/usr
/bin
180 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lowntfs-3g
$(1)/usr
/bin
/
181 $(INSTALL_DIR
) $(1)/sbin
182 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mount.lowntfs-3g
$(1)/sbin
/
185 define Package
/ntfs-3g-low
/postinst
187 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
190 if
! [ -f
'/etc/filesystems' ]; then
191 echo
"Create '$$FILE'."
195 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
196 echo
"Add '$$ID' to known filesystems."
197 echo
"$$ID" >> "$$FILE"
202 define Package
/ntfs-3g-utils
/install
203 $(INSTALL_DIR
) $(1)/sbin
204 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mkfs.ntfs
$(1)/sbin
/
205 $(INSTALL_DIR
) $(1)/usr
/bin
206 $(FIND
) $(PKG_INSTALL_DIR
)/usr
/bin
/ -type f
! -regex
'.*[^/]*ntfs-3g[^/]*' -exec
$(INSTALL_BIN
) {} $(1)/usr
/bin
/ \
;
207 $(INSTALL_DIR
) $(1)/usr
/sbin
208 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
211 $(eval
$(call BuildPackage
,ntfs-3g
))
212 $(eval
$(call BuildPackage
,ntfs-3g-low
))
213 $(eval
$(call BuildPackage
,ntfs-3g-utils
))