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