Name: dosfstools
Summary: Utilities for making and checking MS-DOS FAT filesystems on Linux.
Summary(ja): LinuxでMS-DOS FAT filesystemsを作成/チェックするユーティリティ
Version: 3.0.11
Release: 1%{?_dist_release}

License: GPLv3+
Group: Applications/System
URL: http://www.daniel-baumann.ch/software/dosfstools/

Source0: http://www.daniel-baumann.ch/software/dosfstools/%{name}-%{version}.tar.bz2
# Fix buffer overflow in alloc_rootdir_entry (#674095)
Patch0: dosfstools-3.0.9-fix-alloc-rootdir-entry.patch
# Fix dosfslable on FAT32 (#693662)
Patch1: dosfstools-3.0.11-dosfslabel-fat32.patch

BuildRoot: %{_tmppath}/%{name}-root
Obsoletes: mkdosfs-ygg

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

%description -l ja
dosfstools パッケージには mkdosfs と dosfsck のユーティリティが含まれ、
それぞれハードドライブやフロッピーにおける MS-DOS FAT ファイルシステムの
作成とチェックを行います。

%prep
%setup -q
%patch0 -p1 -b .fix-alloc-rootdir-entry
%patch1 -p1 -b .dosfslabel-fat32

%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing"

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install-bin install-man PREFIX=%{_prefix} SBINDIR=/sbin

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog COPYING doc/*-2.x
/sbin/*
%{_mandir}/man8/*

%changelog
* Thu Apr 07 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0.11-1
- update to 3.0.11
  - update URL
  - License: GPLv3+

* Sat Jul 26 2008 Shu KONNO <owa@bg.wakwak.com> 2.11-6vl5
- applied new versioning policy and spec in utf-8

* Wed Jun  7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.11-5vl1
- updated to 2.11 based on Fedora development
  * Thu May 11 2006 Peter Vrabec <pvrabec@redhat.com> 2.11-5
  - fix work with disk image files > 4GB (#191198)
  * Wed Oct 12 2005 Peter Vrabec <pvrabec@redhat.com> 2.11-1
  - upgrade
- fixed %doc section

* Sun Feb  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8-4vl1
- merged with Vine Linux package based on rawhide package.
- rebuild on new environment. 
 * Sun Mar 31 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.8-0vl3
  - fixed typo (s/dosfcsk/dosfsck/)
  * Tue Feb 05 2002 Toru Sagami <sagami@vinelinux.org> 2.8-0vl2
  - added fsck.msdos.8 symlink
  * Thu Aug 02 2001 Toru Sagami <sagami@vinelinux.org>
  - 2.8-0vl1
  * Sat Feb 17 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
  - 2.7-0vl1
  * Sun Jan 21 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  - 2.6-0vl2
  - use better macros (%%{_syssbidir})
  - fixed incorrect symlink to dosfsck :-)
  * Sun Jan 14 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
  - 2.6-0vl1
  - based on 2.2-4 in RedHat 6.2
  - added Japanese summary and description
  - use macros and add some docs

* Thu Dec 12 2002 Elliot Lee <sopwith@redhat.com> 2.8-4
- Patch2 for errno

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Mar 07 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- update to version 2.8

* Fri Jul  6 2001 Preston Brown <pbrown@redhat.com>
- major upgrade to v2.7.
- forward port old ia64 patch (now incorporated) s390 additions

* Tue Mar 20 2001 Oliver Paukstadt <oliver.paukstadt@millenux.com>
- ported to zSeries (64 bit)

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Fri Jun 17 2000 Bill Nottingham <notting@redhat.com>
- hard link mkdosfs

* Thu Jun 15 2000 Matt Wilson <msw@redhat.com>
- FHS
- patch to build against 2.4 kernel headers (patch3)

* Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
- fix for ia64

* Thu Feb  3 2000 Matt Wilson <msw@redhat.com>
- remove mkdosfs.8 symlink, symlink mkdosfs.8.gz to mkfs.msdos.8.gz

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix descriptions and summary
- man pages are compressed

* Thu Dec 16 1999 Cristian Gafton <gafton@redhat.com>
- fix the 2.88MB drives (patch from hjl)

* Mon Aug 16 1999 Matt Wilson <msw@redhat.com>
- updated to 2.2

* Sun Jun 27 1999 Matt Wilson <msw@redhat.com>
- changed to new maintainer, renamed to dosfstools

* Sat Apr 17 1999 Jeff Johnson <jbj@redhat.com>
- fix mkdosfs on sparc (#1746)

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 10)

* Thu Jan 21 1999 Bill Nottingham <notting@redhat.com>
- build for RH 6.0

* Tue Oct 13 1998 Cristian Gafton <gafton@redhat.com>
- avoid using unsinged long on alphas 

* Sun Aug 16 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
- built against glibc
