File dosfstools.spec of Package dosfstools

#
# spec file for package dosfstools
#
# Copyright (c) 2016 SUSE LINUX 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/
#


Name:           dosfstools
Version:        3.0.26
Release:        0
Summary:        Utilities for Making and Checking MS-DOS FAT File Systems on Linux
License:        GPL-3.0+
Group:          System/Filesystems
Url:            http://daniel-baumann.ch/software/dosfstools/
#Freecode-URL:	http://freecode.com/projects/dosfstools
#Git-Clone:	git://daniel-baumann.ch/git/software/dosfstools
Source:         http://daniel-baumann.ch/files/software/dosfstools/%{name}-%{version}.tar.xz
Source2:        http://daniel-baumann.ch/files/software/dosfstools/%{name}-%{version}.tar.xz.sig
Source3:        %{name}.keyring
Patch0:         %{name}-suse-dirs.patch
Patch1:         dosfstools-3.0.26-read-fat-overflow.patch
Patch2:         dosfstools-3.0.26-off-by-2.patch
Patch3:         dosfstools-fix-attempt-to-rename-root-dir.patch
Supplements:    filesystem(vfat)
Provides:       dosfsck
Provides:       mkdosfs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1230
BuildRequires:  gpg-offline
%endif

%description
The dosfstools package includes the mkdosfs and dosfsck utilities,
which respectively make and check MS-DOS FAT file systems on hard
drives or on floppies.

%prep
%{?gpg_verify: %gpg_verify %{SOURCE2}}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0

%build
make CC="gcc" OPTFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE %{optflags}" %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir}
#UsrMerge
mkdir %{buildroot}/sbin
ln -sf %{_sbindir}/{dosfsck,dosfslabel,mkdosfs,fsck.msdos,mkfs.msdos,fsck.fat,fsck.vfat,mkfs.fat,mkfs.vfat} %{buildroot}/sbin
#EndUsrMerge

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
#UsrMerge
/sbin/*
#EndUsrMerge
%{_sbindir}/*
%{_mandir}/man8/*.gz
%{_mandir}/de/man8/*.gz

%changelog
openSUSE Build Service is sponsored by