Browse Source

ntfs-3g: import from oldpackages, add license info

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 10 years ago
parent
commit
30dad318aa
1 changed files with 217 additions and 0 deletions
  1. 217
    0
      utils/ntfs-3g/Makefile

+ 217
- 0
utils/ntfs-3g/Makefile View File

@@ -0,0 +1,217 @@
1
+#
2
+# Copyright (C) 2007-2014 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:=2014.2.15
14
+PKG_SOURCE:=$(PKG_NAME)_ntfsprogs-$(PKG_VERSION).tgz
15
+PKG_SOURCE_URL:=http://www.tuxera.com/opensource/
16
+PKG_MD5SUM:=f11d563816249d730a00498983485f3a
17
+
18
+PKG_LICENSE:=GPL-2.0 LGPL-2.0
19
+PKG_LICENSE_FILE:=COPYING COPYING.LIB
20
+
21
+PKG_FIXUP:=autoreconf
22
+PKG_INSTALL:=1
23
+
24
+# release contains fuseext/int hint
25
+PKG_RELEASE:=$(PKG_RELEASE)$(if $(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE),-fuseext,-fuseint)
26
+
27
+# define build dir, respect fuseext/int
28
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
29
+
30
+include $(INCLUDE_DIR)/package.mk
31
+
32
+define Package/ntfs-3g/common
33
+  SECTION:=utils
34
+  CATEGORY:=Utilities
35
+  URL:=http://www.tuxera.com
36
+  SUBMENU:=Filesystem
37
+  TITLE:=Stable Read/Write NTFS Driver
38
+  MAINTAINER:=Bud <wrt_buddhay@gmx.net>
39
+endef
40
+
41
+define Package/ntfs-3g
42
+  $(call Package/ntfs-3g/common)
43
+  DEPENDS+= +kmod-fuse +PACKAGE_NTFS-3G_USE_LIBFUSE:libfuse +libpthread
44
+endef
45
+
46
+define Package/ntfs-3g/description
47
+  Ntfs-3g is a NTFS driver, which can create, remove, rename,
48
+  move files, directories, hard links, and streams. It can read
49
+  and write files, including streams and sparse files. It can
50
+  handle special files like symbolic links, devices, and FIFOs.
51
+  Moreover it can also read transparently compressed files.
52
+
53
+  Contains:
54
+   - ntfs-3g
55
+   - ntfs-3g.probe
56
+   - mount.ntfs-3g (symlink to ntfs-3g)
57
+
58
+endef
59
+
60
+define Package/ntfs-3g/config
61
+config PACKAGE_NTFS-3G_USE_LIBFUSE
62
+	bool "use external FUSE library, selects package libfuse"
63
+	depends on PACKAGE_ntfs-3g
64
+	---help---
65
+	Ntfs-3g by default uses a minimalized lite version of FUSE.
66
+	If libfuse is part of your filesystem anyway (because of sshfs, owfs
67
+	etc.) it makes sense to activate this option and save some kilobytes
68
+	of space.
69
+
70
+endef
71
+
72
+define Package/ntfs-3g-low
73
+  $(call Package/ntfs-3g/common)
74
+  TITLE:=lowntfs-3g (alternative using the fuse low-level interface)
75
+  DEPENDS+= +ntfs-3g
76
+endef
77
+
78
+define Package/ntfs-3g-low/description
79
+  Contains:
80
+   - lowntfs-3g
81
+   - mount.lowntfs-3g (symlink to lowntfs-3g)
82
+
83
+  A driver variant using the fuse low-level interface missing some of the
84
+  enhanced functionality for streams or the like. You might want to check:
85
+  http://www.tuxera.com/community/ntfs-3g-manual/
86
+
87
+endef
88
+
89
+define Package/ntfs-3g-utils
90
+  $(call Package/ntfs-3g/common)
91
+  TITLE:=ntfs-3g utilities (ntfs-3g.secaudit, ntfs-3g.usermap)
92
+  DEPENDS+= +ntfs-3g
93
+endef
94
+
95
+define Package/ntfs-3g-utils/description
96
+  Additional ntfs-3g utilities. Not included by default for size
97
+  considerations. All binaries except ntfs-3g, ntfs-3g.probe.
98
+
99
+  Currently:
100
+   - ntfs-3g.secaudit
101
+   - ntfs-3g.usermap
102
+
103
+endef
104
+
105
+# TODO: write a proper description
106
+# new in 2001.4.12
107
+define Package/ntfsprogs_ntfs-3g
108
+  $(call Package/ntfs-3g/common)
109
+  TITLE:=ntfsprogs (ntfs-3g)
110
+  DEPENDS+= +ntfs-3g +libgcrypt +libuuid
111
+endef
112
+
113
+CONFIGURE_ARGS += \
114
+	--enable-shared \
115
+	--enable-static \
116
+	--with-uuid
117
+
118
+# configure/make according selection
119
+ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE
120
+	CONFIGURE_ARGS += --with-fuse=external
121
+	TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include/fuse $(TARGET_CPPFLAGS)
122
+else
123
+	CONFIGURE_ARGS += --with-fuse=internal
124
+	TARGET_CPPFLAGS:=-I../include/fuse-lite $(TARGET_CPPFLAGS)
125
+endif
126
+
127
+# enable disable ntfsprogs
128
+ifneq ($(CONFIG_PACKAGE_ntfsprogs_ntfs-3g)$(SDK)$(DEVELOPER),)
129
+	CONFIGURE_ARGS += --enable-ntfsprogs
130
+else
131
+	CONFIGURE_ARGS += --disable-ntfsprogs
132
+endif
133
+
134
+# redefine prepare to extract to our build dir
135
+# apply patches
136
+define Build/Prepare
137
+	rm -rf $(PKG_BUILD_DIR)/
138
+	mkdir -p $(PKG_BUILD_DIR)/
139
+	$(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1
140
+	$(Build/Patch)
141
+endef
142
+
143
+define Build/InstallDev
144
+	$(INSTALL_DIR) $(1)/usr/include
145
+	$(CP)	$(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/
146
+	$(INSTALL_DIR) $(1)/usr/lib
147
+	$(CP)	$(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{la,a,so*} $(1)/usr/lib/
148
+endef
149
+
150
+define Package/ntfs-3g/install
151
+	$(INSTALL_DIR) $(1)/usr/bin
152
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/
153
+	$(INSTALL_DIR) $(1)/usr/lib
154
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
155
+	$(INSTALL_DIR) $(1)/sbin
156
+	$(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/
157
+endef
158
+
159
+define Package/ntfs-3g/postinst
160
+#!/bin/sh
161
+FILE="$${IPKG_INSTROOT}/etc/filesystems"
162
+ID="ntfs-3g"
163
+
164
+if ! [ -f '/etc/filesystems' ]; then
165
+	echo "Create '$$FILE'."
166
+	touch "$$FILE"
167
+fi
168
+
169
+if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then
170
+	echo "Add '$$ID' to known filesystems."
171
+	echo "$$ID" >> "$$FILE"
172
+fi
173
+
174
+endef
175
+
176
+define Package/ntfs-3g-low/install
177
+	$(INSTALL_DIR) $(1)/usr/bin
178
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lowntfs-3g $(1)/usr/bin/
179
+	$(INSTALL_DIR) $(1)/sbin
180
+	$(CP) $(PKG_INSTALL_DIR)/sbin/mount.lowntfs-3g $(1)/sbin/
181
+endef
182
+
183
+define Package/ntfs-3g-low/postinst
184
+#!/bin/sh
185
+FILE="$${IPKG_INSTROOT}/etc/filesystems"
186
+ID="lowntfs-3g"
187
+
188
+if ! [ -f '/etc/filesystems' ]; then
189
+	echo "Create '$$FILE'."
190
+	touch "$$FILE"
191
+fi
192
+
193
+if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then
194
+	echo "Add '$$ID' to known filesystems."
195
+	echo "$$ID" >> "$$FILE"
196
+fi
197
+
198
+endef
199
+
200
+define Package/ntfs-3g-utils/install
201
+	$(INSTALL_DIR) $(1)/usr/bin
202
+	$(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -name ntfs-3g.probe ! -name ntfs-3g -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \;
203
+endef
204
+
205
+define Package/ntfsprogs_ntfs-3g/install
206
+	$(INSTALL_DIR) $(1)/sbin
207
+	$(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ntfs $(1)/sbin/
208
+	$(INSTALL_DIR) $(1)/usr/bin
209
+	$(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -regex '.*[^/]*ntfs-3g[^/]*' -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \;
210
+	$(INSTALL_DIR) $(1)/usr/sbin
211
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
212
+endef
213
+
214
+$(eval $(call BuildPackage,ntfs-3g))
215
+$(eval $(call BuildPackage,ntfs-3g-low))
216
+$(eval $(call BuildPackage,ntfs-3g-utils))
217
+$(eval $(call BuildPackage,ntfsprogs_ntfs-3g))