Changeset 25113 bumped the version of package ntfs-3g to 2011.1.15 but
[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:=2011.1.15
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_2011.1.15:=15a5cf5752012269fa168c24191f00e2
32 PKG_MD5SUM:=$(PKG_MD5SUM_$(PKG_VERSION))
33
34 PKG_FIXUP:=libtool
35 PKG_INSTALL:=1
36
37 # release contains fuseext/int hint
38 PKG_RELEASE:=$(PKG_RELEASE)$(if $(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE),-fuseext,-fuseint)
39
40 # define build dir, respect fuseext/int
41 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
42
43 include $(INCLUDE_DIR)/package.mk
44
45 define Package/ntfs-3g/common
46 SECTION:=utils
47 CATEGORY:=Utilities
48 URL:=http://www.tuxera.com
49 SUBMENU:=Filesystem
50 TITLE:=Stable Read/Write NTFS Driver
51 MAINTAINER:=Bud <wrt_buddhay@gmx.net>
52 endef
53
54 define Package/ntfs-3g
55 $(call Package/ntfs-3g/common)
56 DEPENDS+= +kmod-fuse +PACKAGE_NTFS-3G_USE_LIBFUSE:libfuse +libpthread
57 endef
58
59 define Package/ntfs-3g/description
60 Ntfs-3g is a NTFS driver, which can create, remove, rename,
61 move files, directories, hard links, and streams. It can read
62 and write files, including streams and sparse files. It can
63 handle special files like symbolic links, devices, and FIFOs.
64 Moreover it can also read transparently compressed files.
65
66 Contains:
67 - ntfs-3g
68 - ntfs-3g.probe
69 - mount.ntfs-3g (symlink to ntfs-3g)
70
71 endef
72
73 define Package/ntfs-3g/config
74 config PACKAGE_NTFS-3G_USE_LIBFUSE
75 bool "use external FUSE library, selects package libfuse"
76 depends on PACKAGE_ntfs-3g
77 ---help---
78 Ntfs-3g by default uses a minimalized lite version of FUSE.
79 If libfuse is part of your filesystem anyway (because of sshfs, owfs
80 etc.) it makes sense to activate this option and save some kilobytes
81 of space.
82
83 endef
84
85 define Package/ntfs-3g-low
86 $(call Package/ntfs-3g/common)
87 TITLE:=lowntfs-3g (alternative using the fuse low-level interface)
88 DEPENDS+= +ntfs-3g
89 endef
90
91 define Package/ntfs-3g-low/description
92 Contains:
93 - lowntfs-3g
94 - mount.lowntfs-3g (symlink to lowntfs-3g)
95
96 A driver variant using the fuse low-level interface missing some of the
97 enhanced functionality for streams or the like. You might want to check:
98 http://www.tuxera.com/community/ntfs-3g-manual/
99
100 endef
101
102 define Package/ntfs-3g-utils
103 $(call Package/ntfs-3g/common)
104 TITLE:=ntfs-3g utilities (ntfs-3g.secaudit, ntfs-3g.usermap)
105 DEPENDS+= +ntfs-3g
106 endef
107
108 define Package/ntfs-3g-utils/description
109 Additional ntfs-3g utilities. Not included by default for size
110 considerations. All binaries except ntfs-3g, ntfs-3g.probe.
111
112 Currently:
113 - ntfs-3g.secaudit
114 - ntfs-3g.usermap
115
116 endef
117
118 CONFIGURE_ARGS += \
119 --enable-shared \
120 --enable-static
121
122 # configure/make according selection
123 ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
124 CONFIGURE_ARGS += --with-fuse=external
125 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include/fuse $(TARGET_CPPFLAGS)
126 else
127 CONFIGURE_ARGS += --with-fuse=internal
128 TARGET_CPPFLAGS:=-I../include/fuse-lite $(TARGET_CPPFLAGS)
129 endif
130
131 # redefine prepare to extract to our build dir
132 define Build/Prepare
133 rm -rf $(PKG_BUILD_DIR)/
134 mkdir -p $(PKG_BUILD_DIR)/
135 $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
136 endef
137
138 define Build/InstallDev
139 $(INSTALL_DIR) $(1)/usr/include
140 $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/
141 $(INSTALL_DIR) $(1)/usr/lib
142 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{la,a,so*} $(1)/usr/lib/
143 endef
144
145 define Package/ntfs-3g/install
146 $(INSTALL_DIR) $(1)/usr/bin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/
148 $(INSTALL_DIR) $(1)/usr/lib
149 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
150 $(INSTALL_DIR) $(1)/sbin
151 $(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/
152 endef
153
154 define Package/ntfs-3g/postinst
155 #!/bin/sh
156
157 if [ -z "$$(grep ^\\ntfs-3g: $${IPKG_INSTROOT}/etc/filesystems)" ]; then
158 echo "ntfs-3g" >> $${IPKG_INSTROOT}/etc/filesystems
159 fi
160
161 endef
162
163 define Package/ntfs-3g-low/install
164 $(INSTALL_DIR) $(1)/usr/bin
165 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lowntfs-3g $(1)/usr/bin/
166 $(INSTALL_DIR) $(1)/sbin
167 $(CP) $(PKG_INSTALL_DIR)/sbin/mount.lowntfs-3g $(1)/sbin/
168 endef
169
170 define Package/ntfs-3g-low/postinst
171 #!/bin/sh
172
173 if [ -z "$$(grep ^\\lowntfs-3g: $${IPKG_INSTROOT}/etc/filesystems)" ]; then
174 echo "lowntfs-3g" >> $${IPKG_INSTROOT}/etc/filesystems
175 fi
176
177 endef
178
179 define Package/ntfs-3g-utils/install
180 $(INSTALL_DIR) $(1)/usr/bin
181 $(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -name ntfs-3g.probe ! -name ntfs-3g -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \;
182 endef
183
184 $(eval $(call BuildPackage,ntfs-3g))
185 $(eval $(call BuildPackage,ntfs-3g-low))
186 $(eval $(call BuildPackage,ntfs-3g-utils))
187