xref: /OK3568_Linux_fs/buildroot/package/ntfs-3g/ntfs-3g.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# ntfs-3g
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunNTFS_3G_VERSION = 2022.5.17
8*4882a593SmuzhiyunNTFS_3G_SOURCE = ntfs-3g_ntfsprogs-$(NTFS_3G_VERSION).tgz
9*4882a593SmuzhiyunNTFS_3G_SITE = http://tuxera.com/opensource
10*4882a593SmuzhiyunNTFS_3G_CONF_OPTS = --disable-ldconfig
11*4882a593SmuzhiyunNTFS_3G_INSTALL_STAGING = YES
12*4882a593SmuzhiyunNTFS_3G_DEPENDENCIES = host-pkgconf
13*4882a593SmuzhiyunNTFS_3G_LICENSE = GPL-2.0+, LGPL-2.0+
14*4882a593SmuzhiyunNTFS_3G_LICENSE_FILES = COPYING COPYING.LIB
15*4882a593SmuzhiyunNTFS_3G_CPE_ID_VENDOR = tuxera
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunHOST_NTFS_3G_CONF_OPTS += --prefix=/ --disable-ldconfig
18*4882a593SmuzhiyunHOST_NTFS_3G_INSTALL_OPTS += DESTDIR=$(HOST_DIR) install
19*4882a593Smuzhiyun
20*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBFUSE),y)
21*4882a593SmuzhiyunNTFS_3G_CONF_OPTS += --with-fuse=external
22*4882a593SmuzhiyunNTFS_3G_DEPENDENCIES += libfuse
23*4882a593Smuzhiyunendif
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
26*4882a593SmuzhiyunNTFS_3G_DEPENDENCIES += util-linux
27*4882a593Smuzhiyunendif
28*4882a593Smuzhiyun
29*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_NTFS_3G_ENCRYPTED),y)
30*4882a593SmuzhiyunNTFS_3G_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
31*4882a593SmuzhiyunNTFS_3G_CONF_OPTS += --enable-crypto
32*4882a593SmuzhiyunNTFS_3G_DEPENDENCIES += gnutls libgcrypt
33*4882a593Smuzhiyunendif
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_NTFS_3G_NTFSPROGS),y)
36*4882a593SmuzhiyunNTFS_3G_CONF_OPTS += --disable-ntfsprogs
37*4882a593Smuzhiyunendif
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun# Create symlink to mount.ntfs
40*4882a593Smuzhiyundefine NTFS_3G_INSTALL_SYMLINK
41*4882a593Smuzhiyun	ln -sf mount.ntfs-3g $(TARGET_DIR)/sbin/mount.ntfs
42*4882a593Smuzhiyunendef
43*4882a593SmuzhiyunNTFS_3G_POST_INSTALL_TARGET_HOOKS += NTFS_3G_INSTALL_SYMLINK
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun# Create wrapper for fsck helper
46*4882a593Smuzhiyundefine NTFS_3G_INSTALL_WRAPPER
47*4882a593Smuzhiyun	FSCK_NTFS=$(TARGET_DIR)/sbin/fsck.ntfs; \
48*4882a593Smuzhiyun	if [ -f $(TARGET_DIR)/usr/bin/ntfsfix ];then \
49*4882a593Smuzhiyun		echo "#!/bin/sh" > $(TARGET_DIR)/sbin/fsck.ntfs; \
50*4882a593Smuzhiyun		echo 'ntfsfix $$(echo $$@ |xargs -n 1|grep "^[^-]")' \
51*4882a593Smuzhiyun			>> $(TARGET_DIR)/sbin/fsck.ntfs; \
52*4882a593Smuzhiyun		chmod 755 $(TARGET_DIR)/sbin/fsck.ntfs; \
53*4882a593Smuzhiyun	fi
54*4882a593Smuzhiyunendef
55*4882a593SmuzhiyunNTFS_3G_POST_INSTALL_TARGET_HOOKS += NTFS_3G_INSTALL_WRAPPER
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun$(eval $(autotools-package))
58*4882a593Smuzhiyun$(eval $(host-autotools-package))
59