• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1%define _binary_payload w9.gzdio
2Name:           mtools
3Summary:        mtools, read/write/list/format DOS disks under Unix
4Version:        4.0.26
5Release:        1
6License:        GPLv3+
7Group:          Utilities/System
8URL:            http://www.gnu.org/software/mtools/
9Source:         ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
10Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12
13%description
14Mtools is a collection of utilities to access MS-DOS disks from GNU
15and Unix without mounting them. It supports long file names, OS/2 Xdf
16disks, ZIP/JAZ disks and 2m disks (store up to 1992k on a high density
173 1/2 disk).
18
19
20%prep
21%setup -q
22
23./configure \
24    --prefix=%{buildroot}%{_prefix} \
25    --sysconfdir=/etc \
26    --infodir=%{buildroot}%{_infodir} \
27    --mandir=%{buildroot}%{_mandir} \
28    --enable-floppyd \
29
30%build
31make
32
33%clean
34echo rm -rf $RPM_BUILD_ROOT
35[ X%{buildroot} != X ] && [ X%{buildroot} != X/ ] && rm -fr %{buildroot}
36
37%install
38make install
39make install-info
40strip %{buildroot}%{_bindir}/mtools %{buildroot}%{_bindir}/mkmanifest %{buildroot}%{_bindir}/floppyd
41rm %{buildroot}%{_infodir}/dir
42
43%files
44%defattr(-,root,root)
45%{_infodir}/mtools.info*
46%{_mandir}/man1/floppyd.1*
47%{_mandir}/man1/floppyd_installtest.1.gz
48%{_mandir}/man1/mattrib.1*
49%{_mandir}/man1/mbadblocks.1*
50%{_mandir}/man1/mcat.1*
51%{_mandir}/man1/mcd.1*
52%{_mandir}/man1/mclasserase.1*
53%{_mandir}/man1/mcopy.1*
54%{_mandir}/man1/mdel.1*
55%{_mandir}/man1/mdeltree.1*
56%{_mandir}/man1/mdir.1*
57%{_mandir}/man1/mdu.1*
58%{_mandir}/man1/mformat.1*
59%{_mandir}/man1/minfo.1*
60%{_mandir}/man1/mkmanifest.1*
61%{_mandir}/man1/mlabel.1*
62%{_mandir}/man1/mmd.1*
63%{_mandir}/man1/mmount.1*
64%{_mandir}/man1/mmove.1*
65%{_mandir}/man1/mpartition.1*
66%{_mandir}/man1/mrd.1*
67%{_mandir}/man1/mren.1*
68%{_mandir}/man1/mshortname.1*
69%{_mandir}/man1/mshowfat.1*
70%{_mandir}/man1/mtools.1*
71%{_mandir}/man5/mtools.5*
72%{_mandir}/man1/mtoolstest.1*
73%{_mandir}/man1/mtype.1*
74%{_mandir}/man1/mzip.1*
75%{_bindir}/amuFormat.sh
76%{_bindir}/mattrib
77%{_bindir}/mbadblocks
78%{_bindir}/mcat
79%{_bindir}/mcd
80%{_bindir}/mclasserase
81%{_bindir}/mcopy
82%{_bindir}/mdel
83%{_bindir}/mdeltree
84%{_bindir}/mdir
85%{_bindir}/mdu
86%{_bindir}/mformat
87%{_bindir}/minfo
88%{_bindir}/mkmanifest
89%{_bindir}/mlabel
90%{_bindir}/mmd
91%{_bindir}/mmount
92%{_bindir}/mmove
93%{_bindir}/mpartition
94%{_bindir}/mrd
95%{_bindir}/mren
96%{_bindir}/mshortname
97%{_bindir}/mshowfat
98%{_bindir}/mtools
99%{_bindir}/mtoolstest
100%{_bindir}/mtype
101%{_bindir}/mzip
102%{_bindir}/floppyd
103%{_bindir}/floppyd_installtest
104%{_bindir}/mcheck
105%{_bindir}/mcomp
106%{_bindir}/mxtar
107%{_bindir}/tgz
108%{_bindir}/uz
109%{_bindir}/lz
110%doc NEWS
111
112%pre
113groupadd floppy 2>/dev/null || echo -n ""
114
115%post
116if [ -f %{_bindir}/install-info ] ; then
117	if [ -f %{_infodir}/dir ] ; then
118		%{_bindir}/install-info %{_infodir}/mtools.info %{_infodir}/dir
119	fi
120	if [ -f %{_infodir}/dir.info ] ; then
121		%{_bindir}/install-info %{_infodir}/mtools.info %{_infodir}/dir.info
122	fi
123fi
124
125
126%preun
127install-info --delete %{_infodir}/mtools.info %{_infodir}/dir.info
128if [ -f %{_bindir}/install-info ] ; then
129	if [ -f %{_infodir}/dir ] ; then
130		%{_bindir}/install-info --delete %{_infodir}/mtools.info %{_infodir}/dir
131	fi
132	if [ -f %{_infodir}/dir.info ] ; then
133		%{_bindir}/install-info --delete %{_infodir}/mtools.info %{_infodir}/dir.info
134	fi
135fi
136
137%changelog
138* Sat Nov 28 2020 Alain Knaff <alain@knaff.lu>
139- Fix compilation on Macintosh
140- Ignore image file locking errors if we are performing a read-only access anyways
141- Minor man-page fixes
142* Sat Oct 24 2020 Alain Knaff <alain@knaff.lu>
143- Preserve non-updated contents of info sector, just in case it contains program code
144- When parsing config file, always use "C" locale for case-insensitive comparisons
145* Sun Mar 22 2020 Alain Knaff <alain@knaff.lu>
146- Spelling fixes in documentation
147- Permit calling "make install" with >= -j2
148- Added AC_SYS_LARGEFILE, needed for compiling on certain ARM procs
149* Sun Dec 09 2018 Alain Knaff <alain@knaff.lu>
150- Address lots of compiler warnings (assignments between different types)
151- Network speedup fixes for floppyd (TCP_CORK)
152- Typo fixes
153- Explicitly pass available target buffer size for character set conversions
154* Sun Dec 02 2018 Alain Knaff <alain@knaff.lu>
155- Fixed -f flag for mformat (size is KBytes, rather than sectors)
156- Fixed toupper/tolower usage (unsigned char rather than plain signed)
157* Sat Nov 24 2018 Alain Knaff <alain@knaff.lu>
158- Fixed compilation for MingW
159- After MingW compilation, make sure executable has .exe extension
160- Addressed compiler warnings
161- Fixed length handling in character set conversion (Unicode file names)
162- Fixed matching of character range, when containing Unicode characters (mdir "c:test[α-ω].exe")
163- Fixed initialization of my_scsi_cmd constructor
164* Sun Nov 11 2018 Alain Knaff <alain@knaff.lu>
165- initialize directory entries to 0
166- bad message "Too few sectors" replaced with "Too many sectors"
167- apostrophe in mlabel no longer causes generation of long entry
168- option to fake system date for file creation using the SOURCE_DATE_EPOCH environment variables
169- can now be compiled with "clang" compiler
170- fallback function for strndup, for those platforms that do not have it
171- fixed a number of -Wextra warnings
172- new compressed archive formats for uz/lz
173- allow to specify number of reserved sectors for FAT32.
174- file/device locking with timeout (rather than immediate failure)
175- fixed support for BPB-less legacy formats.
176- removed check that disk must be an integer number of tracks.
177- removed .eh/.oh macros from manual pages
178* Sat Sep 29 2018 Alain Knaff <alain@knaff.lu>
179- Fix for short file names starting with character 0xE5	(by remapping it to 0x5)
180- mpartition: Partition types closer to what Microsoft uses
181- mformat: figure out LBA geometry as last resort if geometry
182is neither specified in config and/or commandline, nor can be
183queried from the device
184- mformat: use same default cluster size by size as Microsoft for FAT32
185- additional sanity checks
186- document how cluster size is picked in mformat.c man page
187- document how partition types are picked in mpartition.c man page
188* Wed Jan 09 2013 Alain Knaff <alain@knaff.lu>
189- Fix for names of iconv encodings on AIX
190- Fix mt_size_t on NetBSD
191- Fixed compilation on Mingw
192- Fixed doc (especially mformat)
193- Fix mformating of FAT12 filesystems with huge cluster sizes
194- Minfo prints image file name in mformat command line if an image
195- file name was given
196- Always generate gzip-compressed RPMs, in order to remain
197- compatible with older distributions
198- Fixed buffer overflow with drive letter in mclasserase
199* Wed Jun 29 2011 Alain Knaff <alain@knaff.lu>
200- mbadblocks now takes a list of bad blocks (either as sectors
201  or as clusters)
202- mbadblocks now is able to do write scanning for bad blocks
203- mshowfat can show cluster of specific offset
204- Enable mtools to deal with very small sector sizes...
205- Fixed encoding of all-lowercase names (no need to mangle
206  these)
207- Consider every directory entry after an ENDMARK (0x00) to be deleted
208- After writing a new entry at end of a directory, be sure to also add
209  an ENDMARK (0x00)
210- Deal with possibility of a NULL pointer being returned by
211  localtime during timestamp conversion
212* Sat Apr 16 2011 Alain Knaff <alain@knaff.lu>
213- configure.in fixes
214- fixed formatting of fat_size_calculation.tex document
215- compatibility with current autoconfig versions
216- Make it clear that label is limited to 11 characters
217- Fixed typo in initialization of FAT32 info sector
218* Sun Oct 17 2010 Alain Knaff <alain@knaff.lu>
219- Added missing -i option to mshortname
220* Sun Oct 17 2010 Alain Knaff <alain@knaff.lu>
221- Released v4_0_14:
222- New mshortname command
223- Fix floppyd for disks bigger than 2 Gig
224- Remove obsolete -z flag
225- Remove now unsupported AC_USE_SYSTEM_EXTENSIONS
226- Fixed output formatting of mdir if MTOOLS_DOTTED_DIR is set
227- Mformat now correctly writes backup boot sector
228- Fixed signedness of serial number in mlabel
229- Fixed buffer size problem in mlabel
230- Make mlabel write backup boot sector if FAT32
231- Catch situation where both clear and new label are given to mlabel
232- Quote filename parameters to scripts
233- Mformat: Close file descriptor for boot sector
234- Added lzip support to scripts/uz
235- Added Tot_sectors option to mformat
236- Fixed hidden sector handling in mformat
237- Minfo generates mformat command lines containing new -T option
238- Mlabel prints error if label too long
239* Sun Feb 28 2010 Alain Knaff <alain@knaff.lu>
240- Merged Debian patches
241* Tue Nov 03 2009 Alain Knaff <alain@knaff.lu>
242- Mingw compatibility fixes
243