ntfs-3g/ntfs-3g.spec
2020-09-11 21:19:55 +08:00

107 lines
3.2 KiB
RPMSpec

Name: ntfs-3g
Version: 2017.3.23
Release: 11
Epoch: 2
Summary: Linux NTFS userspace driver
License: GPLv2+
URL: http://www.ntfs-3g.org/
Source0: http://tuxera.com/opensource/%%{name}_ntfsprogs-%%{version}%%{?subver}.tgz
Patch0: 0000-ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
Patch1: 0001-check-mftmirr.patch
Patch2: 0002-ntfs-3g-big-sectors.patch
Patch3: 0003-ntfsclone-full-clusters-bz1601146.patch
Patch4: CVE-2019-9755.patch
BuildRequires: libtool, libattr-devel, libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release}
Obsoletes: ntfsprogs-fuse
Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release}
Provides: ntfsprogs%{?_isa} ntfsprogs
Obsoletes: ntfsprogs
Provides: ntfsprogs-gnomevfs = %{epoch}:%{version}-%{release}
Obsoletes: ntfsprogs-gnomevfs
Obsoletes: ntfsprogs < 2.0.0-17
%description
NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS driver for Linux and many other operating systems.
It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008 and
Windows 7 NTFS file systems.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}, pkgconfig
Provides: ntfsprogs-devel = %{epoch}:%{version}-%{release}
Obsoletes: ntfsprogs-devel < 2.0.0-17
%description devel
This package includes development files for %{name}.
%package help
Summary: man files for %{name}
Requires: man
%description help
This package includes man files for %{name}.
%prep
%setup -q -n %{name}_ntfsprogs-%{version}%{?subver}
%patch0 -p1 -b .unsupported
%patch1 -p0 -b .check-mftmirr
%patch2 -p0 -b .big-sectors
%patch3 -p0 -b .ntfsclone
%patch4 -p1
%build
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
%configure --disable-static --disable-ldconfig --exec-prefix=/ --enable-posix-acls --enable-xattr-mappings --enable-crypto --enable-extras --enable-quarantined
%make_build LIBTOOL=%{_bindir}/libtool
%install
make LIBTOOL=%{_bindir}/libtool DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
rm -rf $RPM_BUILD_ROOT/%{_sbindir}/mount.ntfs-3g
cp -a $RPM_BUILD_ROOT/%{_bindir}/ntfs-3g $RPM_BUILD_ROOT/%{_sbindir}/mount.ntfs-3g
cd $RPM_BUILD_ROOT/%{_bindir}
ln -s ntfs-3g ntfsmount
cd -
cd $RPM_BUILD_ROOT/%{_sbindir}
ln -s mount.ntfs-3g mount.ntfs-fuse
ln -s mount.ntfs-3g mount.ntfs
ln -s ../bin/ntfsck fsck.ntfs
cd -
mv $RPM_BUILD_ROOT/sbin/* $RPM_BUILD_ROOT/%{_sbindir}
rmdir $RPM_BUILD_ROOT/sbin
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/README
%ldconfig_scriptlets
%files
%doc AUTHORS CREDITS NEWS README
%license COPYING
%{_sbindir}/mount.*
%{_sbindir}/*ntfs*
%{_bindir}/*ntfs*
%{_libdir}/libntfs-3g.so.*
%files devel
%{_includedir}/ntfs-3g/
%{_libdir}/libntfs-3g.so
%{_libdir}/pkgconfig/*.pc
%files help
%{_mandir}/man*/*
%changelog
* Tue Sep 8 2020 zhanghua <zhanghua40@huawei.com> - 2:2017.3.23-11
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix CVE-2019-9755
* Fri Dec 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:2017.3.23-10
- Package init