2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
17 PKG_SOURCE_URL:=http://www.ntfs-3g.org/
18 PKG_MD5SUM:=873a8de662849d129fc7c475ad3f5447
21 PKG_BUILD_DEPENDS:=libfuse
23 include $(INCLUDE_DIR)/package.mk
25 define Package/ntfs-3g
27 DEPENDS:=+libfuse +fuse-utils
31 Third generation Read/Write NTFS driver
32 URL:=http://www.ntfs-3g.org
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
37 touch configure.in ; \
40 touch include/config.h.in ; \
42 $(TARGET_CONFIGURE_OPTS) \
43 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
44 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
45 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
57 --datadir=/usr/share \
58 --includedir=/usr/include \
59 --infodir=/usr/share/info \
61 --libexecdir=/usr/lib \
62 --localstatedir=/var \
63 --mandir=/usr/share/man \
66 $(DISABLE_LARGEFILE) \
71 --enable-kernel-module \
75 --disable-auto-modprobe \
76 --with-kernel="$(LINUX_DIR)" \
82 $(MAKE) -C $(PKG_BUILD_DIR) \
83 ARCH="$(LINUX_KARCH)" \
84 CROSS_COMPILE="$(TARGET_CROSS)" \
85 DESTDIR="$(PKG_INSTALL_DIR)" \
89 define Build/InstallDev
90 mkdir -p $(STAGING_DIR)/usr/include
91 $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(STAGING_DIR)/usr/include/
92 mkdir -p $(STAGING_DIR)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{a,so*} $(STAGING_DIR)/usr/lib/
96 define Build/UninstallDev
97 rm -rf $(STAGING_DIR)/usr/include/ntfs-3g \
98 $(STAGING_DIR)/usr/lib/libntfs-3g.{a,so*}
101 define Package/ntfs-3g/install
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g $(1)/usr/bin/
104 $(INSTALL_DIR) $(1)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
108 $(eval $(call BuildPackage,ntfs-3g))