File guestfs-winsupport.spec of Package guestfs-winsupport
#
# spec file for package guestfs-ntfs
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define ntfs_version 2013.1.13
Name: guestfs-winsupport
Version: 1.0.0
Release: 0
License: GPL-2.0+
Summary: Windows guests support in libguestfs
Url: http://www.tuxera.com/community/ntfs-3g-download/
Group: System/Filesystems
Source: ntfs-3g_ntfsprogs-%{ntfs_version}.tgz
Source1: README
Patch0: b921b09fb-build-with-libgrypt-1.6.patch
Requires: libguestfs >= 1.32
%if 0%{?sles_version}
BuildRequires: fuse-devel >= 2.6.0
%else
BuildRequires: pkgconfig(fuse) >= 2.6.0
%endif
BuildRequires: pkgconfig
BuildRequires: libgcrypt-devel
BuildRequires: libgnutls-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Provides the needed pieces for libguestfs to handle Windows guests.
%prep
%setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version}
%patch0 -p1
%build
#
# regarding -Wno-sign-compare - checked with the Szaka: There is one variable
# which is signed and would possibly ok to be unsigned. Any solution to this
# needs to be carefully reviewed and tested, so we do not change the code now:
#
export CFLAGS="$RPM_OPT_FLAGS -Wformat -Wformat-security -W -Wno-sign-compare"
%configure \
--disable-static \
--disable-ldconfig \
--exec-prefix=/ \
--enable-crypto \
--enable-extras \
--enable-quarantined
make %{?_smp_mflags}
%install
mkdir destdir
make install DESTDIR=$PWD/destdir %{?_smp_mflags}
rm -rf destdir/%{_libdir}/*.la
rm -rf destdir/%{_libdir}/*.a
ln -s %{_sysconfdir}/alternatives/mount.ntfs destdir/sbin/mount.ntfs
mkdir -p destdir%{_sysconfdir}/alternatives
ln -s /sbin/mount.ntfs-3g destdir%{_sysconfdir}/alternatives/mount.ntfs
cp %{S:1} destdir
# Remove development files.
rm -r destdir/%{_includedir}
rm -r destdir/%{_libdir}/pkgconfig
# Take the destdir and put it into a tarball for the libguestfs appliance.
mkdir -p %{buildroot}%{_libdir}/guestfs/supermin.d
pushd destdir
tar zcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz .
popd
%files
%defattr(-,root,root)
%doc ChangeLog README COPYING
%dir %{_libdir}/guestfs
%dir %{_libdir}/guestfs/supermin.d
%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz
%changelog