bump ntfs-3g to latest stable
[openwrt/svn-archive/archive.git] / utils / ntfs-3g / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ntfs-3g
11 PKG_RELEASE:=1
12
13 PKG_VERSION:=2010.10.2
14
15 ## 2010.3.6 needs a recent uclibc 0.9.30.2 or greater
16 ## this has been fixed in 2010.5.16, keeping this in case this happens again
17 #PKG_UCLIBC_VERSION:=$(call qstrip,$(CONFIG_UCLIBC_VERSION))
18 #ifneq (,$(or $(findstring !0.9.29,!$(PKG_UCLIBC_VERSION)),$(findstring !0.9.30.1!,!$(PKG_UCLIBC_VERSION)!) ))
19 # PKG_VERSION:=2010.1.16
20 #endif
21
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
23 PKG_SOURCE_URL:=http://www.tuxera.com/opensource/
24
25 PKG_MD5SUM_2010.1.16:=e104c914e8d7d29ee83e63d46afbba25
26 PKG_MD5SUM_2010.3.6:=12ce21aa044c6068a4df6e8cbd3c5cfa
27 PKG_MD5SUM_2010.5.16:=aeff7659a4943c9223d79116f051a863
28 PKG_MD5SUM_2010.5.22:=caa08c73220a7106c76f697b7a7915ec
29 PKG_MD5SUM_2010.8.8:=6c109746c2708f679725a2ea441c61c6
30 PKG_MD5SUM_2010.10.2:=91405690f25822142cdcb43d03e62d3f
31 PKG_MD5SUM:=$(PKG_MD5SUM_$(PKG_VERSION))
32
33 PKG_FIXUP:=libtool
34 PKG_INSTALL:=1
35
36 # release contains fuseext/int hint
37 PKG_RELEASE:=$(PKG_RELEASE)$(if $(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE),-fuseext,-fuseint)
38
39 # define build dir, respect fuseext/int
40 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
41
42 include $(INCLUDE_DIR)/package.mk
43
44 define Package/ntfs-3g/common
45 SECTION:=utils
46 CATEGORY:=Utilities
47 URL:=http://www.tuxera.com
48 SUBMENU:=Filesystem
49 TITLE:=Stable Read/Write NTFS Driver
50 MAINTAINER:=Bud <wrt_buddhay@gmx.net>
51 endef
52
53 define Package/ntfs-3g
54 $(call Package/ntfs-3g/common)
55 DEPENDS+= +kmod-fuse +PACKAGE_NTFS-3G_USE_LIBFUSE:libfuse +libpthread
56 endef
57
58 define Package/ntfs-3g/description
59 Ntfs-3g is a NTFS driver, which can create, remove, rename,
60 move files, directories, hard links, and streams. It can read
61 and write files, including streams and sparse files. It can
62 handle special files like symbolic links, devices, and FIFOs.
63 Moreover it can also read transparently compressed files.
64
65 Contains:
66 - ntfs-3g
67 - ntfs-3g.probe
68
69 endef
70
71 define Package/ntfs-3g/config
72 config PACKAGE_NTFS-3G_USE_LIBFUSE
73 bool "use external FUSE library, selects package libfuse"
74 depends on PACKAGE_ntfs-3g
75 ---help---
76 Ntfs-3g by default uses a minimalized lite version of FUSE.
77 If libfuse is part of your filesystem anyway (because of sshfs, owfs
78 etc.) it makes sense to activate this option and save some kilobytes
79 of space.
80
81 endef
82
83 define Package/ntfs-3g-utils
84 $(call Package/ntfs-3g/common)
85 TITLE:=ntfs-3g utilities (ntfs-3g.secaudit, ntfs-3g.usermap)
86 DEPENDS+= +ntfs-3g
87 endef
88
89 define Package/ntfs-3g-utils/description
90 Additional ntfs-3g utilities. Not included by default for size
91 considerations. All binaries except ntfs-3g, ntfs-3g.probe.
92
93 Currently:
94 - ntfs-3g.secaudit
95 - ntfs-3g.usermap
96
97 endef
98
99 define Package/mount.ntfs-3g
100 $(call Package/ntfs-3g/common)
101 TITLE:=ntfs-3g mount helper
102 DEPENDS+= +ntfs-3g
103 endef
104
105 define Package/mount.ntfs-3g/description
106 ntfs-3g mount helper. You must enable busybox mount helper too.
107 endef
108
109 CONFIGURE_ARGS += \
110 --enable-shared \
111 --enable-static
112
113 # configure/make according selection
114 ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
115 CONFIGURE_ARGS += --with-fuse=external
116 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include/fuse $(TARGET_CPPFLAGS)
117 else
118 CONFIGURE_ARGS += --with-fuse=internal
119 TARGET_CPPFLAGS:=-I../include/fuse-lite $(TARGET_CPPFLAGS)
120 endif
121
122 # redefine prepare to extract to our build dir
123 define Build/Prepare
124 rm -rf $(PKG_BUILD_DIR)/
125 mkdir -p $(PKG_BUILD_DIR)/
126 $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
127 endef
128
129 define Build/InstallDev
130 $(INSTALL_DIR) $(1)/usr/include
131 $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{la,a,so*} $(1)/usr/lib/
134 endef
135
136 define Package/ntfs-3g/install
137 $(INSTALL_DIR) $(1)/usr/bin
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
141 endef
142
143 define Package/mount.ntfs-3g/install
144 $(INSTALL_DIR) $(1)/sbin
145 $(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/
146 endef
147
148 define Package/mount.ntfs-3g/postinst
149 #!/bin/sh
150
151 if [ -z "$$(grep ^\\ntfs-3g: $${IPKG_INSTROOT}/etc/filesystems)" ]; then
152 echo "ntfs-3g" >> $${IPKG_INSTROOT}/etc/filesystems
153 fi
154
155 endef
156
157 define Package/ntfs-3g-utils/install
158 $(INSTALL_DIR) $(1)/usr/bin
159 $(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -name ntfs-3g.probe ! -name ntfs-3g -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \;
160 endef
161
162 $(eval $(call BuildPackage,ntfs-3g))
163 $(eval $(call BuildPackage,ntfs-3g-utils))
164 $(eval $(call BuildPackage,mount.ntfs-3g))
165