Summary: A collection of CD/DVD utilities.
Summary(ja): CD/DVD ユーティリティコレクション
Name: dvdrtools
Version: 0.1.5
Release: 0vl1
License: GPL
Group: Applications/System
Source: %{name}-%{version}.tar.bz2
Patch1: dvdrtools-0.1.2-O_EXCL.patch
Patch2: dvdrtools-0.1.4-video.patch

URL: http://www.freesoftware.fsf.org/dvdrtools/
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
dvdrtools is a collection of CD/DVD utilities.

%package -n dvdrecord
Summary: A command line CD/DVD recording program.
Group: Applications/Archiving

%description -n dvdrecord
Dvdrecord is an application for creating audio and data CDs and DVDs.
Dvdrecord works with many different brands of CD/DVD recorders, fully supports
multi-sessions and provides human-readable error messages.

%package -n mkisofs
Summary: Creates an image of an ISO9660 filesystem.
Group: Applications/System
Obsoletes: cdrecord-mkisofs

%description -n mkisofs
The mkisofs program is used as a pre-mastering program; i.e., it
generates the ISO9660 filesystem.  Mkisofs takes a snapshot of
a given directory tree and generates a binary image of the tree
which will correspond to an ISO9660 filesystem when written to
a block device.  Mkisofs is used for writing CD-ROMs, and includes
support for creating bootable El Torito CD-ROMs.

Install the mkisofs package if you need a program for writing
CD-ROMs.

%package -n cdda2wav
Group: Applications/Multimedia
Summary: A utility for sampling/copying .wav files from digital audio CDs.
Obsoletes: cdrecord-cdda2wav

%description -n cdda2wav
Cdda2wav is a sampling utility for CD-ROM drives that are capable of
providing a CD's audio data in digital form to your host. Audio data
read from the CD can be saved as .wav or .sun format sound files.
Recording formats include stereo/mono, 8/12/16 bits and different
rates.  Cdda2wav can also be used as a CD player.

%prep
%setup -q
%patch1 -p1 -b .excl
%patch2 -p1 -b .video
autoconf
%configure

%build
make

%install
rm -rf "$RPM_BUILD_ROOT"
make install DESTDIR="$RPM_BUILD_ROOT"
# FIXME: remove once automake works correctly and doesn't mess with
# filenames
# KH: fixed it. Should work now in both cases
files=`/bin/ls -1 $RPM_BUILD_ROOT%{_bindir}/*-*-*-*` 2>/dev/null ||:
  for i in $files; do
	mv $i $RPM_BUILD_ROOT%{_bindir}/`echo $i |sed -e "s,.*-,,"`
  done
files=`/bin/ls -1 $RPM_BUILD_ROOT%{_mandir}/man1/*-*-*-*` 2>/dev/null ||:
  for i in $files; do
	mv $i $RPM_BUILD_ROOT%{_mandir}/man1/`echo $i |sed -e "s,.*-,,"`
  done
ln -s dvdrecord $RPM_BUILD_ROOT%{_bindir}/cdrecord

# remove unpackaged files from the buildroot
rm -f $RPM_BUILD_ROOT%{_bindir}/{cdda2mp3,cdda2ogg,cdda2wav,devdump,isodump,isoinfo,isovfy,mkisofs,readcd}
rm -rf $RPM_BUILD_ROOT%{_mandir}/man8
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{cdda2wav.1,readcd.1}*

%clean
rm -rf $RPM_BUILD_ROOT

%files -n dvdrecord
%defattr(-,root,root)
%doc ChangeLog NEWS AUTHORS README*
%{_bindir}/dvdrecord
%{_bindir}/dvdgen
%{_bindir}/ifogen
%{_bindir}/makecd
#%{_bindir}/tocgen

%if 0
%{_bindir}/cdrecord
%{_bindir}/readcd
%{_bindir}/devdump
%{_mandir}/man1/readcd.1*
%endif
%{_mandir}/man1/dvdrecord.1*

%if 0
%files -n mkisofs
%defattr(-,root,root)
%doc mkisofs/ChangeLog
%doc mkisofs/README*
%{_bindir}/*iso*
%{_mandir}/man8/*iso*.8*

%files -n cdda2wav
%defattr(-,root,root)
%doc cdda2wav/FAQ cdda2wav/OtherProgs
%doc cdda2wav/README* cdda2wav/Frontends cdda2wav/HOWTOUSE
%{_bindir}/cdda2*
%{_mandir}/man1/cdda2wav.1*
%endif

%changelog
* Sun Jun 29 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.1.5-0vl1
- build for Vine Linux
- new upstream release

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon May 26 2003 Harald Hoyer <harald@redhat.de> 0.1.4-1
- version 0.1.4

* Tue May 13 2003 Harald Hoyer <harald@redhat.de> 0.1.2-12
- refined O_EXCL patch, nonroot sg handling

* Mon May 12 2003 Harald Hoyer <harald@redhat.de> 0.1.2-11
- refined O_EXCL patch, nonroot sg handling

* Wed Feb 26 2003 Harald Hoyer <harald@redhat.de> 0.1.2-10
- refined O_EXCL patch

* Tue Feb 25 2003 Harald Hoyer <harald@redhat.de> 0.1.2-9
- refined O_EXCL patch

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Thu Nov 28 2002 Harald Hoyer <harald@redhat.de> 0.1.2-7
- dvdrtools-0.1.2-O_EXCL.patch added

* Wed Nov 27 2002 Tim Powers <timp@redhat.com> 0.1.2-6
- remove unpackaged files from the buildroot

* Mon Oct  7 2002 Mike A. Harris <mharris@redhat.com> 0.1.2-5
- All-arch rebuild

* Thu Aug 08 2002 Karsten Hopp <karsten@redhat.de>
- fixed automake workaround. Should work now even if automake behaves as
  intended

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

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

* Thu Mar 14 2002 Bernhard Rosenkraenzer <bero@redhat.com> 0.1.2-1
- initial build for Red Hat Linux; disable cdda2wav and mkisofs
  and readcd because we're getting them from cdrtools for now.
