# Upstream auther:	Joerg Schilling <schilling@fokus.gmd.de>

%define	alphav	a04

Summary:	A set command line tools for CD/DVD-Recorders
Summary(ja):	CD/DVD レコーダーのためのコマンドラインツール
Name:		cdrtools
Version:	2.01.01
#Release:	0vl0%{?alphav:.%{alphav}}.1
Release:	1%{?alphav:.%{alphav}}%{?_dist_release}
License:	CDDL
Group:		Applications/Multimedia
URL:		http://cdrecord.berlios.de/old/private/cdrecord.html
Source:		%{name}-%{version}%{?alphav:%{alphav}}.tar.bz2

# security fix
Patch0:		cdrecord-2.01-CAN-2004-0806.patch.bz2

# patches from http://people.mandriva.com/~warly/files/cdrtools/
Patch10:	cdrtools-2.01.01a04-dvd.patch.bz2
Patch13:	cdrtools-2.01.01a04-rawio.patch.bz2
Patch14:	cdrtools-2.01.01a03-warnings.patch
Patch15:	cdrtools-2.01.01a01-scanbus.patch.bz2
Patch16:	cdrtools-2.01.01a03-rezero.patch

# debian
Patch30:	cdrtools-2.01.01-mkisofs-iconv.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	libcap-devel, perl

%description
A set command line tools for CD/DVD-Recorders including cdrecord,
mkisofs, readcd, isoinfo and others.

%description -l ja
CD/DVD レコーダーのためのコマンドラインツール群。
cdrecord, mkisofs, readcd, isoinfo などのコマンドが含まれています。

%package	cdrecord
Summary:	A command line CD/DVD-Recorder
Summary(ja):	コマンドラインの CD/DVD 書き込みツール
Group:		Applications/Multimedia
Obsoletes:	cdrecord
Provides:	cdrecord

%description	cdrecord
Cdrecord allows you to create CD's on a CD-Recorder (SCSI/ATAPI).
Supports data, audio, mixed, multi-session and CD+ discs etc.

%package	devel
Summary:	Libraries and Headers needed for development.
Group:		Development/Libraries
Obsoletes:	cdrecord-devel, cdrtools-libscg, cdrtools-utils

%description	devel
Libraries and Headers for development.

%package	cdda2wav
Summary:	Get WAV files from digital audio cd's
Group:		Applications/Multimedia
Obsoletes:	cdda2wav, cdrecord-cdda2wav
Provides:	cdda2wav

%description	cdda2wav
A sampling utility for cdrom drives that are capable of sending audio
cd data in digital form to your host. Data can be dumped into wav or
sun format sound files. Options control the recording format (stereo/mono;
8,12,16 bits; different rates).

%package	mkisofs
Summary:	Creates a ISO9660 filesystem image
Group:		Applications/System
Obsoletes:	mkisofs, mkhybrid, cdrecord-mkhybrid, cdrecord-mkisofs
Provides:	mkisofs

%description	mkisofs
This is the mkisofs package.  It is used to create ISO 9660
file system images for creating CD-ROMs. Now includes support
for making bootable "El Torito" CD-ROMs.

%prep
%setup -q
%patch0 -p1 -b .CAN-2004-0806
%patch10 -p1 -b .dvd
%patch13 -p1 -b .rawio
%patch14 -p1 -b .warnings
%patch15 -p1 -b .scanbus
%patch16 -p1 -b .rezero

%patch30 -p1 -b .iconv

%__perl -pi -e "s/^COPTOPT=.*/COPTOPT=$RPM_OPT_FLAGS/g" RULES/*-linux-cc.rul
find . -name \*.mk|xargs %__perl -pi -e 's/INSDIR=\s*lib\s*$/INSDIR=%{_lib}\n/g'

%build
./Gmake.linux

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mandir=%{_mandir}
./Gmake.linux "MANDIR=${mandir#/usr}" \
"INS_BASE=${RPM_BUILD_ROOT}%{_prefix}" install

# Installing Header files for use with devel package
rm include/scg
install -d ${RPM_BUILD_ROOT}%{_prefix}/include/schily/scg
install -m 644 include/* ${RPM_BUILD_ROOT}%{_prefix}/include/schily
install -m 644 incs/*/xconfig.h ${RPM_BUILD_ROOT}%{_prefix}/include/schily
install -m 644 libscg/scg/* ${RPM_BUILD_ROOT}%{_prefix}/include/schily/scg

# Installing default config.
mkdir -p ${RPM_BUILD_ROOT}/etc/default
install -m 644 cdrecord/cdrecord.dfl ${RPM_BUILD_ROOT}/etc/default/cdrecord
install -m 644 rscsi/rscsi.dfl ${RPM_BUILD_ROOT}/etc/default/rscsi

## Preparing doc files for RPM
# cdrecord
{
  pushd doc
  groff -Tps -man cdrecord.man > cdrecord.ps
  popd
}

# cdrecord
mkdir cdrecord-rpmdocs
cp AN-%{version}* doc/cdrecord.ps Changelog README.* \
   cdrecord/cdrecord.dfl cdrecord-rpmdocs
chmod 644 -R cdrecord-rpmdocs/*
cp -a READMEs cdrecord-rpmdocs/

# cdda2wav
mkdir cdda2wav-rpmdocs
cp AN-%{version}* cdda2wav/Frontends cdda2wav/GPL cdda2wav/HOWTOUSE \
   cdda2wav/OtherProgs cdda2wav/README cdda2wav/THANKS cdda2wav/TODO \
   cdda2wav/cdda2mp3 cdda2wav/cdda2mp3.new cdda2wav/cdda_links \
   cdda2wav/pitchplay cdda2wav/readmult cdda2wav/tracknames.pl \
   cdda2wav/tracknames.txt cdda2wav/FAQ cdda2wav/cdda2ogg \
   cdda2wav-rpmdocs
chmod 644 cdda2wav-rpmdocs/*

install -m 755 cdda2wav/cdda2{mp3,ogg} $RPM_BUILD_ROOT%{_bindir}/

# mkisofs
mkdir mkisofs-rpmdocs
cp AN-%{version}* mkisofs/COPYING mkisofs/ChangeLog mkisofs/README* \
   mkisofs-rpmdocs
chmod 644 mkisofs-rpmdocs/*

# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_mandir}/man5/make{files,rules}.5*

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files	cdrecord
%defattr(-,root,root)
%doc cdrecord-rpmdocs/*
%config(noreplace) /etc/default/cdrecord
%config(noreplace) /etc/default/rscsi
%{_bindir}/cdrecord
%{_bindir}/readcd
%{_bindir}/devdump
%{_bindir}/isoinfo
%{_bindir}/isodump
%{_bindir}/isodebug
%{_bindir}/isovfy
%{_bindir}/skel
%{_mandir}/man1/cdrecord.1*
%{_mandir}/man1/readcd.1*
%{_mandir}/man8/isoinfo.8*
%{_sbindir}/rscsi

%files	devel
%defattr(-,root,root)
%{_bindir}/scgcheck
%{_libdir}/*.a
%{_mandir}/man1/scgcheck.1*
%{_includedir}/*.h
%{_includedir}/schily

%files	cdda2wav
%defattr(-,root,root)
%doc cdda2wav-rpmdocs/*
%{_prefix}/bin/cdda2wav
%{_prefix}/bin/cdda2ogg
%{_prefix}/bin/cdda2mp3
%{_mandir}/man1/cdda2wav.1*
%{_mandir}/man1/cdda2ogg.1*

%files	mkisofs
%defattr(-,root,root)
%doc mkisofs-rpmdocs/*
%{_bindir}/mkisofs
%{_bindir}/mkhybrid
%{_mandir}/man8/mkisofs.8*
%{_mandir}/man8/mkhybrid.8*

%changelog
* Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 2.01.01-1.a04vl5
- applied new versioning policy, spec in utf-8

* Fri Nov 03 2006 NAKAMURA Kenta <kenta@vinelinux.org> 2.01.01-0vl0.a04.1
- added perl script to support lib64 architecture

* Fri Oct 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01.01-0vl0.a04
- update to cdrtools-2.01.01a04
- update dvd patch
- remove unneeded patches
- add iconv patch instead of NLS patch.

* Fri Oct 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01.01-0vl0.a01
- update to cdrtools-2.01.01a01
  - FIXME: 2.01.01a03 and newer is not compatible with NLS patch
- update dvd patch
- add Patch15 to allow scanbus as user

* Fri Sep 15 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 2.01-0vl1
- new upstream release
- [SECURITY] import CAN-2004-0806.patch (patch20) from MDV
  - fix RSH environment variable privilege escalation vulnerability
- update URL
- drop stupid macros
- overwrite COPTOPT with $RPM_OPT_FLAGS
- add BuildRequires: libcap-devel, perl
- unofficial patches
  - update dvd.patch (patch10)
  - add rawio.patch (patch13) to burn as user with kernel 2.6.8
  - add warnings.patch (patch14) to remove warnings

    cf. http://people.mandriva.com/~warly/files/cdrtools/

* Sat Jun 19 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-0.a31vl2
- apply unofficial DVD support patch (Patch10,11,12)
  http://people.mandrakesoft.com/~warly/files/cdrtools/

* Tue Jun 15 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.01-0.a31vl1
- new upstream release

* Sat Jan 17 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.01-0.a24vl2
- rebuild for VineSeedPlus

* Wed Jan 14 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.01-0.a24vl1
- source upgrade to 2.01_alpha24

* Tue Sep 23 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.01-0.a15vl2
- rebuild with new toolchains

* Tue Jun  3 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.01-0.a15vl1
- source upgrade to 2.01_alpha15

* Sat May 24 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.01-0.a14vl1
- source upgrade to 2.01_alpha14
- use Gmake instead of make
- add patch0 from Momonga Linux CVS repository

* Mon May 12 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.11a40-0vl2
- change man dir from /usr/man to /usr/share/man
- revised %files section

* Mon Dec  2 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.11a40-0vl1
- new upstream release 1.11a40 for newer xcdroast.
- build for Vine Linux based on cdrtools-1.11a24-1

* Tue Jun 04 2002 tn@xcdroast.org
  [cdrtools-1.11a24-1]

- see changelog
* Wed May 15 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a23-1]
- Cdrecord:
- Try to make cdrecord behave more polite for platforms (like Cygwin)
  that don't support large files when the DVD data to be written
  is read from stdin.
  mkisofs ... | cdrecord ... - 
  will now work for DVDs on non large file OS
- Call flush buffer in silent mode to avoid error messages with
  cdrecord -toc called on a CD-ROM drive.

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- Fix some bugs with option parsing introduced with the new option
  parsing using getargs()
- New option -version to make cdrtools behave similar
- New option paraopts=opts for paranoia options.
- Print Paranoia statistics result at end of every track.

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Try to fix (very old) rotten code in various files that did cause
  integer overflows for files > 2 GB - 2kB.
  Inconsistent use of (always diferent) hand crufted code using
  2048, 2047, ... instead of SECTOR_SIZE, ISO_ROUND_UP(), ...
  Note that this is not only of interest for DVDs as mkisofs could
  believe that > 2 GB of data would fit on a CD.
- New code to print file type names.

* Tue May  7 2002 Ryan Weaver <ryanw@falsehope.com>
- Renamed cdrtools-libscg to cdrtools-devel because the package
  contains much more than just libscg.a and associated headers now.
  [cdrtools-1.11a22-1]
- All:
- Autoconf code now check for alloca() and dynamic sized array support
  (needed by libparanoia).
- Added links for ia64-linux to the Make RULES to allow users of GNUmake
  to compile cdrtools on IA64. Note that "smake" includes automake
  features and will auto-create the missing links.

- Libparanoia:
- The paranoia code from cdparanoia (written by Monty xiphmont@mit.edu)
  has been converted into a portable library.

- Libscg:
- Enhanced list of SCSI Error texts from SCSI standard from 29.5.2001
- New callback function to allow execption handling to be done after
  the current SCSI command did finish.

- Cdrecord:
- Corrected printf() formats for verbose printing to hold enough
  space for media > 1 GB (DVD)
- Corrected printf() formats to make the write speed non-jumping.
- If called from a GUI, cdrecord now reads from "stderr" if
  the CD-input-data is from "stdin".
  If it turns out that stderr is not open for reading, cdrecord
  waits to receive a SIGUSR1
- Better printouts for the DISC-ids covered by the orange forum embargo.
- DVD structure structure definition enhanced to reflect
  current standard.
- new option gracetime=
- Try to abort DAO recording with a flush_buffer() if ^C is hit.

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- new script cddda2ogg
- bugfix deemphasizing (thanks to Klaus Wolterec)
- bugfix rounding error (creation of info files)
- added AlbumPerformer entry in info files
- integration of Monty's libparanoia
- switch to J?gs getargs option handling

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Allow the -sort option to work with the Eltorito Boot Catalogue
- Corrected the man page that still incorrectly stated that at least one
  pathspec on the command line is needed.
- Correct the new short usage function so there will be no more
  core dumps on intel processors.
- Allow '-' to be part of the ISO-9660 filename if -no-iso-translate
  has been specified. 
  Thanks for this hint from Georgy Salnikov (sge@nmr.nioch.nsc.ru)
  from Novosibirsk, Russia.
- Try to avoid an integer overflow with the -C option and DVDs

* Sun Apr 21 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a21-1]
- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- new script cddda2ogg

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Man page part for UTF-converting corrected
- Canonicalize graft points so commands like:
  mkisofs -graft-points /a/b/././//=some_dir
  and
  mkisofs -graft-points /a/b/../c/=some_dir
  will not cause broken ISO images anymore.
- Avoid unwanted information in debug information on disk.

* Fri Apr  5 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a20-1]
- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Only print a short Usage if mkisofs detected a usage error.
- -z option now working to create CDs in a format with Linux proprietary
  Rock Ridge extensions for transparent compression.
  This is a patch from H.P. Anvin. It makes only sense with Linux-2.4.14
  or later.
- New option -debug
- Correctly use stat()/lstat() with graft points
- Fixed a bug with escape character handling in graft point handling.
- Make the graft point a directory if the file it should point to
  is a directory.
- Correctly handle non-canonical filenames with graft points.
  .////././///test=OBJ/sparc-sunos5-cc/ will now work correctly
  and not result in a corrupted ISO-Filesystem.

* Tue Mar 26 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a19-1]
- All:
- Add hints that compiling on unknown platforms wil only work if
  "smake" is used.
- Autoconf code for Large file support now handles Linux system include
  file bugs that prevented correct behavior on 64 Bit Linux systems.

- Cdrecord:
- DVD-R code (undisclosed) now supports:
  Vendor_info    : 'MATSHITA' 
  Identifikation : 'DVD-RAM LF-D310 ' 
  Revision       : 'A116' 
- Support for SCMS from *.inf files
  Note that you need to use cdda2wav/cdrecord that have fitting versions
  because of this change. Otherwise cdrecord may add SCMS copy 
  protection.
- RAW mode now honors COPY bit and SCMS coding.
- Avoid coredump with "cdrecord textfile= non/existant ..."
- New CD-text *inf file Tag Albumperformer=
  NOTE later versions of cdrecord will ignore 
  Albumtitle= and Albumperformer= if the value is not identical
  for all tracks.

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- Better TOC ADDR/CRTL (red book) handling
- Better method to scan for indices.
- Support for SCMS in *.inf files
- Better SUID/SGID handling

- Readcd:
- Better behavior with extreme badly readable media.
- List number of completely unreadable sectors in addition to
  the C2 error count.

* Fri Mar 15 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a18-1]
- Libscg:
- Make the packet code compile on Linux  > 2.2.12 && < 2.4.3

- Readcd:
- Now use /etc/default/cdrecord as documented in the man page.

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Fixed a minor bug with HFS labels & multi-session
  Thanks to James Pearson

* Mon Mar 11 2002 Ryan Weaver <ryanw@falsehope.com>
- Removed patch to change location of config files.
  Default config location /etc/default.
  ALL OLD CONFIG FILES -WILL NOT- UPGRADED.
  NO PATCHING OF CONFIG FILES WILL TAKE PLACE.
  PLEASE EDIT ANY UNWORKABLE DEFAULTS AFTER INSTALLATION.

  [cdrtools-1.11a17-1]
- All:
- This release contains a clean up and many new important features...
- VMS script build_all.com now includes astoll.c so compilation
  on VMS should work again.
- Many README's cleaned up.
- New macros for max/min values of int*_t in utypes.h
- Limit the different handling of packed bitfields for AIX to AIX CC.
- Unfortunately fragementation of cdrecord has begun.
  I noticed this fact recently when people started to ask me
  senseless things which turned out to be a result of
  a modified cdrtools source that I have not ben aware of.

  One main goal of cdrtools is to provide a platform indepenant
  user interface which cannot be achieved if people change important
  parts os the user interface. 
  For this reason, I changed the license in hope that this will
  help at least to keep the user interface the same on all
  platforms and on all distributions.

  Please keep in mind that fragmentation in many cases increases
  my workload. There is no real reason for a modification,
  and (even worse) the people who create modifications do not help
  to keep my workload low in order to help me (and Heiko and James)
  with the cdrtools project. People should rather contribute to
  the project. Cdrtools should be free and actively mantained
  in future. With increasing workload, I don't know how to do this.

- Libscg:
- Version -> 0.6
- Adding support for the CDROM_SEND_PACKET ioctl() from cdrom.c

- Cdrecord:
- Default usage code is now only 6 lines so the error message
  does no longer scroll out the screen. If yu like to get the old
  long usage information, call cdrecord -help
- move 'dd' like number conversion stuff into getnum.c
- Allow the /etc/default/cdrecord parsing code to be used by
  readcd too (as documented in the man page)
- First support for Plextor's VariRec feature in the PX-W4012
  I am not sure about the final user interface.
  For now, call e.g. cdrecord speed=4 driveropts=varirec=-1
  for all audio CDs. Allowed varirec parameters are -2, -1, 0, 1, 2
  VariRec only works at write speed 4.
- Print the actual current write speed in verbose mode.

- Readcd:
- Now use /etc/default/cdrecord as documented in the man page.

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Fixed a minor bug with HFS labels & multi-session
  Thanks to James Pearson

* Sun Mar  3 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a16-1]
- Cdrecord:
- Allow ' to appear inside CD-Text strings
- better messages for CD manufacturer codes that are not in the
  latest free Orange forum table.

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- new option -L changed. Now a numerical parameter (0 or 1)
  defines the handling of multiple cddbp entries.
  0 enters user interactive mode.
  1 take the first entry unconditionally.
  I still need a reasonable way for gui interaction in this case!
  Proposals are welcome.
- made cddbp handling for mixed mode cds more robust.
  It is unclear yet, if data tracks have to be included in the
  query. Anybody knows the definitive answer?

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Support generic boot code if session does not start at sector 0.

* Sun Feb 24 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a15-1]
- All:
- Support for NT-5.1 (WIN XP) added os-cygwin_nt-5.1.id

- Cdrecord:
- CD-Text Code now also accepts Text File without 4 byte Size header
- CD-Text file read code now is able to do CRC error correction
  Note that only songle bit errors per 18 byte pack.
- First CD-text Authoring support:

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- Fixed a bug that caused cdda2wav to dump core with certain
  CD-Text data.

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Fixed a check in the Apple HFS code that used strcmp for
  data that could contain null bytes.
- Introduced many casts to enhance portability.
  This was needed for GNU fnmatch.c and the HFS support lib libhfs_iso
- Use Protoyped function definitions for hash.c to allow old UNIX variants
  where sizeof(dev_t) is < sizeof(int)

* Mon Feb 11 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a14-1]
- All:
- New rule allows automatic fallback to GCC if the configured
  default compiler could not be found.
- statdefs.h enhanced
- Many corrections to give less warnings on SCO Openserver

- Libscg:
- Massive modicifation of the support code for SCO OpenServer 5.x

- Cdda2wav (By Heiko Ei?eldt heiko@hexco.de):
- New option -L to ask freedb.freedb.org for CDDB information.
  This alllows to automatically create CD-Text CDs.
- correct TOC endianess for FreeBSD ioctl interface.

- Readcd:
- Enhanced output for C2 error scan.

- Mkisofs (By J?g Schilling and James Pearson j.pearson@ge.ucl.ac.uk):
- Fixed a check in the Apple HFS code that used strcmp for
  data that could contain null bytes.
- Introduced many casts to enhance portability.
  This was needed for GNU fnmatch.c and the HFS support lib libhfs_iso
- Use Protoyped function definitions for hash.c to allow old UNIX variants
  where sizeof(dev_t) is < sizeof(int)

* Fri Jan 18 2002 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a13-1]
- All:
- New supported architctures:
  s390-linux-cc.rul parisc-linux-cc.rul parisc64-linux-cc.rul
- Large File support for IRIX-6.2 (added autoconf test for -n32 cc option)
- Large File support for IRIX-6.5 now everything works correctly if the
  OS supports Large Files by default in 32 bit mode (uses fseeko()/ftello()
  if present. This could only be done by massively changing the autoconf code
  stolen from GNUtar.
- Support for SGI IRIX platform ip17-irix
- Support for SGI IRIX-6.5
- Try to support recent BeOS (again)
  Workaround in libschily/comerr.c for the nonstandard
  big negative errno values on BeOS
- libschily now includes floating point printf() for BeOS
- fileluopen.c from libschily now compiles on BeOS (without O_NDELAY)
- workaround for the nonstandard negative errno values on BeOS
- Schily makefile RULES for AmigaOS added
- getpagesize() emulation for BeOS to make cdda2wav compile on BeOS

- Libscg:
- Try to make scsi-beos.c compile on new BeOS version 5
- First attempt to integrate the AmigaOS SCSI transport interface code
  from Thomas Langer <Langer.Thomas@gmx.net>

- Rscsi:
- Make it compile on BeOS

- Cdrecord:
- correctly use the buffer capacity code from the driver instead
  of the MMC-2 read buffer cap code directly
- Support for the unusual not ready error code of the CyberDrive CW038D

- Cdda2wav:
- fixed ioctl handling of toc entries
- checked ISRC retrieval (MMC + Plextor)
- more checking for weird CDs with wrong track types
- bugfix in setuid.c
- read full toc method extended to a data track in the second
  session for cd-extra/enhanced cd recognition
- if the tracks in the TOC are labelled as data, this is checked
  and corrected if untrue
- show cd text disc identification, if one exist
- a new perl script to generate a binary cdtext file for use with
  cdrecord. This is currently very simple, but it enables you to
  create cd-text enriched copies from non cd-text originals.
  For a hint how to use the new perl script see the CD-text usage
  notes above.

- Readcd:
- use comerrno() instead of comerr() if the drive is not ready
  as errno is not valid after that test.

- Scgcheck:
- Corrected some typos

- Mkisofs:
- Fixed a bug in the man page (typo .R instead of .B made text invisible)
- Write messages with more correct size names for the floppy eltorito
  boot images
- rearranged the man page by removing the unreadable short listing
  of options on the synopsys line.
- Added UDF to the man page
- Added a missing prototype in getopt.c
- isodump.c isoinfo.c isovfy.c:
  Correctly handle symlinks use offsetof(struct iso_directory_record, name[0])
  instead of sizeof(struct iso_directory_record) - sizeof(idr->name)

* Mon Nov 26 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a12-1]
- All:
- fixed fexec.c to make it compile ion QNX
- Now the complete libschily is included although it it not needed
  for cdrtools.

- Cdda2wav:
- Changed handling of Table of contents. Now the more informative
  methods of Read full toc are being used in favor to the old SCSI readtoc
  command. For Sony methods, the fallback is the old method.
  The new methods are available on MMC drives and modern drives with
  Sony command sets. It should enhance access to very weird multi session
  cds.

- Mkisofs:
- Fixed a problem from an uninitialized variable in desktop.c
  that caused random effects in Apple CD's
- better documentation for README.sort/README.hide from James Pearson
- Fixed a bug in sort code that caused the compare function to behave
  symmetric when called c(a,b) vs. c(b,a)
- First UDF support via -udf option - thanks to Ben Rudiak-Gould.
  Note that the UDF support is not what you might indend. It is currently
  wired to the Joliet tree which is a bad idea. It also does not yet
  support Symbolic Links, user ID's and similar.

* Mon Nov 19 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a11-1]
- All:
- fixed a bug in the new floatingpoint code that caused the emulation
  code to be activated on Linux too.
- added more parts from libschily to allow the cdrtools package to
  be used as a plugin base for the new 'Slottable Source Plugin Module'
  system (SSPM).

- Cdrecord:
- Better messages when trying to write more than the amount of data
  that fits on a DVD.
- The DVD driver now reports a DVD media back to the high level code.

* Mon Nov 12 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a10-1]
- All:
- timedefs.h modified. Now the last schily portability support include
  file hast been reworked to make portability even much easier.
- schily.h & standard.h havebeen modified to hopefully finally solve
  all type clash problems with size_t & spawn*()
- Compile support for QNX Neutrino
- Now we hopefully have floating point support for _all_ platforms
  even those without *cvt() and without __dtoa(). Thanks to a hint
  from Thomas Langer <Langer.Thomas@gmx.net> we now use strtod.c
  to gert a fallback __dtoa()
- Added an autoconf test for rcmd() so cdrtools now should compile
  again on BeOS and AmigaOS where no rcmd() is present.

- Cdrecord:
- Fixed a bug introduced with cdrtools-1.11a07 for better DVD+CD
  recognition support that prevented cdrecord to work with non MMC
  writers.

- Mkisofs:
- libhfs_iso reworked to use timedefs.h from schily portability support.
- man page enhanced
- Better error messages for ISO and Rock Ridge directory sort problems
- Preserves HFS file dates for AppleDouble, AppleSingle and NetaTalk files

* Tue Oct 30 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a09-1]
- All:
- Better support for Darwin-1.3 and 1.4
- Schily support includefiles rearranged to make portability even
  easier.
- mconfig.h now defines IS_SCHILY to signal users of the
  Schily makefilesystem, that the Schily portability environment
  is being used.
- now includes the forgotten mkdep-sco.sh that helps to better
  work around the SCO C-compiler.

- Libscg:
- First attempt for support for the new IOKit SCSI interface on MaxOS X
  Darwin-1.4 and newer with much much help from
  Constantine Sapuntzakis  <csapuntz@Stanford.EDU>
  Unfortunately there is not yet support for SCSI devices nor
  is there support for standard Bus,Target,Lun device namings.
  I hope that bot may be added in the future.
  Volunteers who like to help with the libscg interface stuff
  for Darwin-1.4 are welcome.

- Rscsi:
- Code now checks for HAVE_NETDB_H (added by request of
  "Thomas" <Langer.Thomas@gmx.de> to help with AmigaOS port)
  This should indicate whether there is support for rcmd()
  in the OS.

- Cdrecord:
- Behaviour of the function that reads fs= tsize= and similar
  corrected.
- Modified driver interface for better DVD support
- FIFO Code now checks for HAVE_FORK (added by request of
  "Thomas" <Langer.Thomas@gmx.de> to help with AmigaOS port)

- Cdda2wav:
- Restructured to better use the schily makefile portability structures.
- Many other changes from Heiko - ask Heiko heiko@hexco.de for
  the list.

- Mkisofs:
- Try to avoid the C-compiler warnings for getopt.c that are caused
  by the non-confirming way of hacking used by FSF people
- isoinfo now corectly displays file with filesize > 1 GB
- isoinfo now implements a new option -s that displays the size
  of the files in multiples of the sector size (2048 Bytes)

* Tue Oct  8 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a08-1]
- Libscg:
- Better scg_open() error messages when trying to do scanbus on Linux
  and no /dev/sg* or /dev/pg* could be opened.
- Output Request Sense buffer with -debug when the USCSI interface is
  used on Solaris.

- Cdrecord:
- Reading CD-Text on DOS/Win32 now works correclty. The O_BINARY
  flag is used for open().
- modify -version output if Clone writing support is present
- A new driver has been added that first checks the media if the drive
  supports to write CD & DVD.

- Cdda2wav:
- Changes to make cdda2wav compile better on Alpha/True64

* Tue Sep 11 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a07-1]
- All:
- Better and extended description in README.macosX
- Support for SCO (Caldera) OpenUNIX (aka. UnixWare 8)

- Libscg:
- Trying to add a workaround for just another bug in the
  sg driver in the Linux kernel. If a TIMEOUT occurs,
  the error code does not indicate a TIMEOUT.

- Rscsi:
- Now using signal safe read/write functions.

- Cdrecord:
- rscsi client code now uses buffered read to speed up on Cygwin
- rscsi client code now uses signal safe read/write functions
- Cdrecod now does not open/close the tray anymore if the disk
  is going to be erased.

- Mkisofs:
- Man page updated and corrected.

* Mon Jul 16 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a06-1]
- All:
- forgot to add the new printf.c with 1.11a05 now cdrtools really
  compiles with GCC-3.0 on Linux

- Cdrecord:
- better FIFO debug messages
- New driver config table for Taiyo Yuden EW-50.
  This dive is like a Philips CDD-521 but has been reported to
  swab audio data.

- Readcd:
- Better handling of C2 scans on unreadable data disks.

- Scgcheck:
- Fixed Makefile so scgcheck now compiles on FreeBSD

* Fri Jun 28 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a05-1]
- NOTE: There are 3000 new lines of code and aprox. 1500 lines
        of code did change within the last few weeks.
	Although I thoroughly tested every line of my code,
        there may be bugs...

	Please report if you have any problem that is not present
        with cdrtools-1.11a01.

- All:
- Circumvent some problems with GCC-3.0 on Linux
- Removed printf() definitions from schily.h to avoid type clashes

- Cdrecord:
- Circumvent a bug in the system include files from Linux that
  makes printf() a macro and prevented compilation with GCC-3.0

- Added some #include <stdio.h> to substitute missing printf() definitions
- SAO/R16 mode removed from tests, it may never occur.
- Changed some .min defines in structs to .pmin to avoid K&R complier
  problems

- Readcd:
- Better handling of C2 scans on unreadable data disks.

- Scgcheck:
- Fixed Makefile so scgcheck now compiles on FreeBSD

* Tue Jun 19 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a04-1]
- NOTE: There are 3000 new lines of code and aprox. 1500 lines
        of code did change within the last few weeks.
	Although I thoroughly tested every line of my code,
        there may be bugs...

	Please report if you have any problem that is not present
        with cdrtools-1.11a01.

- Cdrecord:
- add a forgotten if (xdebug) in drv_mmc.c.
  This caused a superfluous write mode debug message to be printed
- do installation of exit handlers (to reset SCSI state) earlier
- Cdrecord now does not exit with 0 anymore when interrupted with ^C
  during the waittime before starting to write.
- First CD-Text support (can only copy CD-Text information from master
  disk) (See AN-1.11a04 for more details)

- Readcd:
- Handle signals and other aborts by restoring old drive state
- Set PF bit with mode select.
- New option -quiet to suppress primary SCSI error messages
  in read CD error handling
  This are the messages that are printed before entering the
  retry mode.
- Secondary SCSI error messages are now suppressed by default,
  they may be turned on again with -verbose
  This are the messages that are printed in -noerror
  retry mode.

  [cdrtools-1.11a03-1]
- Cdrecord:
- Fixed a bug in the option checking that prevented to write
  data CD's at all.
  Now only "RAW data" CD's are flagged as expected.
- Fixed a bug in the Firmware bug recognition system.
  This bug did prevent cdrecord to work with Philips drives
  when writing in RAW mode.
- Added the -raw* options to the man page
- New options -copy & -nocopy to allow to modify the 'copy' bit
  in audio subchannel data.
- -scms option added to the man page and online help.
- New model to compute SCSI transfersizes
- -xa1 -xa2 sector typedefinitions changed.
- Debug messages while checking possible write modes of MMC
  compliant made optional.
- RAW writing scatter sector function made more general
- New functions to convert between 2448 and 2368 byte sectors

- Readcd:
- error handling increased

* Tue Jun  5 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a02-1]
- There are 2000 new lines of code and aprox. 1000 lines
  of code did change within the last two weeks.
  Although I thoroughly tested every line of my code,
  there may be bugs...
  Please report if you have any problem that is not present
  with cdrtools-1.11a01.

- Cdrecord:
- I hope that the 90 minute CD capacity warning now will finally
  disappear for DVD writers.
- Old test code removed that prevented cdrecord from being able
  to write manually configured indices. Note that the index lists
  from the *.inf files with using the -useinfo option alway worked.
- -force will force cdrecord to ingnore any failed forced OPC.
  currently this is only done if the drive does not support
  forced OPC.
- Do forced OPC before blanking a CD-RW
- Driveropts "burnproof" renamed to "burnfree".
  This has been done as this technology now appears in the MMC standard.
- Cdrecord now shows whether BURN-Free is active. This makes
  sense as Ricoh's "Just-Link" is enabled by default.
  Unfortunately, the way "Just-link" is implemented is not compliant
  with the MMC standard. We will have to wait until I get the needed
  information from Ricoh.
- Support for MMC RAW mode writing.
  This allows to do disk at once recording on Philips drives that
  do not support SAO.
- Cdrecord now checks the properties of the writer. If a specific write
  mode is not supported by the writer, cdrecord warns you and makes
  a suggestion for a similar alternate write mode.
  With the curent structure of cdrecord, it is not possible to silently
  e.g. change the write mode from -dao to -raw96r
- MMC compliant drives are automatically scanned for supported write modes.
  This should help to make cdrecord work without manual static configuration.
  My hope is still to have no need to know all drive properties in
  advance, so new drives will continue to work as long as they
  are standard comliant enough for cdrecord.

* Sat May 19 2001 Ryan Weaver <ryanw@falsehope.com>
  [cdrtools-1.11a01-1]
- All:
- Now using the "Slottable Source" feature of the makefile system.
  This is the fist modular reusable portable makefile standard
  in the open source world.
- README.multi fixed
- README.sony fixed
- config.sub now recognises "parisc-unknown-linux-gnu"

- Rscsi:
- RSCSI now works if the target is a Win32 system.
  This is not done by changing rscsi.c but by fixing a bug
  in Cygwin!
- Now prints user ID & user Name into DEBUG file

- Cdrecord:
- New option -overburn
  This option has been added as many people seem to be unabe to understand
  that they are going to write more than the official disk capacity from
  reading cdrecord's output. Oveburnung now is no more done by default!
- Do not print a warning for writing more than 90 minutes if the media is
  a DVD
- Fix for a problem with setting high priority on Win32 systems.
  Thanks to  egor duda <deo@logos-m.ru>
- Sony MMC drives now work in -multi session mode.
  There was a bug in cdrecord that was accepted by all other drives.
  The bug did cause a temporary bad setup to the drive.

- Readcd:
- better error recovery with -noerror


