2 # Copyright (C) 2007-2008 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).tgz
15 PKG_SOURCE_URL
:=http
://www.ntfs-3g.org
/
16 PKG_MD5SUM
:=e0b5c170f088a8d82968f0a6b34d31da
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/ntfs-3g
/common
23 URL
:=http
://www.ntfs-3g.org
25 TITLE
:=Stable Read
/Write NTFS Driver
(build options
)
28 define Package
/ntfs-3g
/description
29 ntfs-3g is an NTFS driver
, which can create
, remove
, rename
,
30 move files
, directories
, hard links
, and streams
; it can read
31 and write files
, including streams and sparse files
; it can
32 handle special files like symbolic links
, devices
, and FIFOs
;
33 moreover it can also read transparently compressed files.
36 define Package
/ntfs-3g
37 $(call Package
/ntfs-3g
/common
)
38 DEPENDS
+= +LINUX_2_4
:kmod-fuse24
+libpthread
+LINUX_2_6
:kmod-fuse
42 define Package
/externalFUSE
43 $(call Package
/ntfs-3g
/common
)
44 TITLE
:=use external FUSE library
(package libfuse
)
46 DEPENDS
+=ntfs-3g
+libfuse
49 define Package
/externalFUSE
/description
50 Ntfs-3g by default uses a lite version of FUSE for the ease
51 of use and some special features. If you
'd rather like to use
52 the systemwide standard FUSE library activate this option [M|*].
59 # insert config with external libfuse
60 ifdef CONFIG_PACKAGE_externalFUSE
61 CONFIGURE_ARGS += --with-fuse=external \
62 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
63 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
64 PKG_RELEASE:=$(PKG_RELEASE)-fuseext
66 CONFIGURE_ARGS += --with-fuse=internal
67 PKG_RELEASE:=$(PKG_RELEASE)-fuseint
71 CFLAGS="$(TARGET_CFLAGS)" \
72 $(TARGET_CONFIGURE_OPTS) CPPFLAGS='' LDFLAGS=''
75 define Build/Configure
76 (cd $(PKG_BUILD_DIR) ; \
77 $(TARGET_CONFIGURE_OPTS) \
78 CFLAGS="$(TARGET_CFLAGS)" \
85 $(MAKE) -C $(PKG_BUILD_DIR) \
86 ARCH="$(LINUX_KARCH)" \
87 CROSS_COMPILE="$(TARGET_CROSS)" \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
92 define Build/InstallDev
93 $(INSTALL_DIR) $(1)/usr/include
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{a,so*} $(1)/usr/lib/
99 define Package/ntfs-3g/install
100 $(INSTALL_DIR) $(1)/usr/bin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g $(1)/usr/bin/
102 $(INSTALL_DIR) $(1)/usr/lib
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
106 # order matters!!! else a probably missing fuse lib might not be build beforehand
107 $(eval $(call BuildPackage,externalFUSE))
108 $(eval $(call BuildPackage,ntfs-3g))