2 # Copyright (C) 2007-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 # 2011.4.12 integrates ntfsprogs and changed srcfile name
14 PKG_VERSION
:=2011.4.12
15 # disable next line and do _not_ select ntfsprogs_ntfs-3g to build an older version
16 PKG_SOURCE
:=$(PKG_NAME
)_ntfsprogs-
$(PKG_VERSION
).tgz
18 ## 2010.3.6 needs a recent uclibc 0.9.30.2 or greater
19 ## this has been fixed in 2010.5.16, keeping this in case this happens again
20 #PKG_UCLIBC_VERSION:=$(call qstrip,$(CONFIG_UCLIBC_VERSION))
21 #ifneq (,$(or $(findstring !0.9.29,!$(PKG_UCLIBC_VERSION)),$(findstring !0.9.30.1!,!$(PKG_UCLIBC_VERSION)!) ))
22 # PKG_VERSION:=2010.1.16
25 PATCH_DIR
:=.
/patches-
$(PKG_VERSION
)
27 PKG_SOURCE?
=$(PKG_NAME
)-$(PKG_VERSION
).tgz
28 PKG_SOURCE_URL
:=http
://www.tuxera.com
/opensource
/
30 PKG_MD5SUM_2010.1
.16:=e104c914e8d7d29ee83e63d46afbba25
31 PKG_MD5SUM_2010.3
.6:=12ce21aa044c6068a4df6e8cbd3c5cfa
32 PKG_MD5SUM_2010.5
.16:=aeff7659a4943c9223d79116f051a863
33 PKG_MD5SUM_2010.5
.22:=caa08c73220a7106c76f697b7a7915ec
34 PKG_MD5SUM_2010.8
.8:=6c109746c2708f679725a2ea441c61c6
35 PKG_MD5SUM_2010.10
.2:=91405690f25822142cdcb43d03e62d3f
36 PKG_MD5SUM_2011.1
.15:=15a5cf5752012269fa168c24191f00e2
37 PKG_MD5SUM_2011.4
.12:=9c4ce318373b15332239a77a9d2a39fe
38 PKG_MD5SUM
:=$(PKG_MD5SUM_
$(PKG_VERSION
))
43 # release contains fuseext/int hint
44 PKG_RELEASE
:=$(PKG_RELEASE
)$(if
$(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
),-fuseext
,-fuseint
)
46 # define build dir, respect fuseext/int
47 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_RELEASE
)
49 include $(INCLUDE_DIR
)/package.mk
51 define Package
/ntfs-3g
/common
54 URL
:=http
://www.tuxera.com
56 TITLE
:=Stable Read
/Write NTFS Driver
57 MAINTAINER
:=Bud
<wrt_buddhay@gmx.net
>
60 define Package
/ntfs-3g
61 $(call Package
/ntfs-3g
/common
)
62 DEPENDS
+= +kmod-fuse
+PACKAGE_NTFS-3G_USE_LIBFUSE
:libfuse
+libpthread
65 define Package
/ntfs-3g
/description
66 Ntfs-3g is a NTFS driver
, which can create
, remove
, rename
,
67 move files
, directories
, hard links
, and streams. It can read
68 and write files
, including streams and sparse files. It can
69 handle special files like symbolic links
, devices
, and FIFOs.
70 Moreover it can also read transparently compressed files.
75 - mount.ntfs-3g
(symlink to ntfs-3g
)
79 define Package
/ntfs-3g
/config
80 config PACKAGE_NTFS-3G_USE_LIBFUSE
81 bool
"use external FUSE library, selects package libfuse"
82 depends on PACKAGE_ntfs-3g
84 Ntfs-3g by default uses a minimalized lite version of FUSE.
85 If libfuse is part of your filesystem anyway
(because of sshfs
, owfs
86 etc.
) it makes sense to activate this option and save some kilobytes
91 define Package
/ntfs-3g-low
92 $(call Package
/ntfs-3g
/common
)
93 TITLE
:=lowntfs-3g
(alternative using the fuse low-level interface
)
97 define Package
/ntfs-3g-low
/description
100 - mount.lowntfs-3g
(symlink to lowntfs-3g
)
102 A driver variant using the fuse low-level interface missing some of the
103 enhanced functionality for streams or the like. You might want to
check:
104 http
://www.tuxera.com
/community
/ntfs-3g-manual
/
108 define Package
/ntfs-3g-utils
109 $(call Package
/ntfs-3g
/common
)
110 TITLE
:=ntfs-3g utilities
(ntfs-3g.secaudit
, ntfs-3g.usermap
)
114 define Package
/ntfs-3g-utils
/description
115 Additional ntfs-3g utilities. Not included by default for size
116 considerations. All binaries except ntfs-3g
, ntfs-3g.probe.
124 # TODO: write a proper description
126 define Package
/ntfsprogs_ntfs-3g
127 $(call Package
/ntfs-3g
/common
)
128 TITLE
:=ntfsprogs
(ntfs-3g
)
129 DEPENDS
+= +ntfs-3g
+libgcrypt
136 # configure/make according selection
137 ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
138 CONFIGURE_ARGS
+= --with-fuse
=external
139 TARGET_CPPFLAGS
:=-I
$(STAGING_DIR
)/usr
/include/fuse
$(TARGET_CPPFLAGS
)
141 CONFIGURE_ARGS
+= --with-fuse
=internal
142 TARGET_CPPFLAGS
:=-I..
/include/fuse-lite
$(TARGET_CPPFLAGS
)
145 # enable disable ntfsprogs
146 ifneq ($(CONFIG_PACKAGE_ntfsprogs_ntfs-3g
)$(SDK
)$(DEVELOPER
),)
147 CONFIGURE_ARGS
+= --enable-ntfsprogs
149 CONFIGURE_ARGS
+= --disable-ntfsprogs
152 # redefine prepare to extract to our build dir
155 rm -rf
$(PKG_BUILD_DIR
)/
156 mkdir
-p
$(PKG_BUILD_DIR
)/
157 $(TAR
) -xzf
$(DL_DIR
)/$(PKG_SOURCE
) -C
$(PKG_BUILD_DIR
) --strip 1
161 define Build
/InstallDev
162 $(INSTALL_DIR
) $(1)/usr
/include
163 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ntfs-3g
$(1)/usr
/include/
164 $(INSTALL_DIR
) $(1)/usr
/lib
165 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.
{la
,a
,so
*} $(1)/usr
/lib
/
168 define Package
/ntfs-3g
/install
169 $(INSTALL_DIR
) $(1)/usr
/bin
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ntfs-3g
{,.probe
} $(1)/usr
/bin
/
171 $(INSTALL_DIR
) $(1)/usr
/lib
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libntfs-3g.so.
* $(1)/usr
/lib
/
173 $(INSTALL_DIR
) $(1)/sbin
174 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mount.ntfs-3g
$(1)/sbin
/
177 define Package
/ntfs-3g
/postinst
179 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
182 if
! [ -f
'/etc/filesystems' ]; then
183 echo
"Create '$$FILE'."
187 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
188 echo
"Add '$$ID' to known filesystems."
189 echo
"$$ID" >> "$$FILE"
194 define Package
/ntfs-3g-low
/install
195 $(INSTALL_DIR
) $(1)/usr
/bin
196 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lowntfs-3g
$(1)/usr
/bin
/
197 $(INSTALL_DIR
) $(1)/sbin
198 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mount.lowntfs-3g
$(1)/sbin
/
201 define Package
/ntfs-3g-low
/postinst
203 FILE
="$${IPKG_INSTROOT}/etc/filesystems"
206 if
! [ -f
'/etc/filesystems' ]; then
207 echo
"Create '$$FILE'."
211 if
! grep
-q
-e
'^ntfs-3g$$' "$$FILE"; then
212 echo
"Add '$$ID' to known filesystems."
213 echo
"$$ID" >> "$$FILE"
218 define Package
/ntfs-3g-utils
/install
219 $(INSTALL_DIR
) $(1)/usr
/bin
220 $(FIND
) $(PKG_INSTALL_DIR
)/usr
/bin
/ -type f
! -name ntfs-3g.probe
! -name ntfs-3g
-exec
$(INSTALL_BIN
) {} $(1)/usr
/bin
/ \
;
223 define Package
/ntfsprogs_ntfs-3g
/install
224 $(INSTALL_DIR
) $(1)/sbin
225 $(CP
) $(PKG_INSTALL_DIR
)/sbin
/mkfs.ntfs
$(1)/sbin
/
226 $(INSTALL_DIR
) $(1)/usr
/bin
227 $(FIND
) $(PKG_INSTALL_DIR
)/usr
/bin
/ -type f
! -regex
'.*[^/]*ntfs-3g[^/]*' -exec
$(INSTALL_BIN
) {} $(1)/usr
/bin
/ \
;
228 $(INSTALL_DIR
) $(1)/usr
/sbin
229 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
232 $(eval
$(call BuildPackage
,ntfs-3g
))
233 $(eval
$(call BuildPackage
,ntfs-3g-low
))
234 $(eval
$(call BuildPackage
,ntfs-3g-utils
))
235 $(eval
$(call BuildPackage
,ntfsprogs_ntfs-3g
))