- play stupid tricks, to let alternatives make the links and rpm not

removing them afterwards
- removed bogus warning for "." and ".."
This commit is contained in:
Harald Hoyer 2007-09-21 08:07:34 +00:00
parent 23db6ff35a
commit 3baa22c4fd
2 changed files with 48 additions and 18 deletions

View File

@ -1,7 +1,7 @@
Summary: A collection of CD/DVD utilities
Name: cdrkit
Version: 1.1.6
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2
Group: Applications/System
URL: http://cdrkit.org/
@ -23,9 +23,8 @@ Obsoletes: dvdrecord <= 0:0.1.5
Provides: dvdrecord = 0:0.1.5.1
Obsoletes: cdrecord < 9:2.01-12
Provides: cdrecord = 9:2.01-12
Requires(preun): %{_sbindir}/alternatives
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives chkconfig coreutils
Requires(post): %{_sbindir}/alternatives chkconfig coreutils
%description -n wodim
Wodim is an application for creating audio and data CDs. Wodim
@ -38,9 +37,8 @@ Group: Applications/System
Obsoletes: mkisofs < 9:2.01-12
Provides: mkisofs = 9:2.01-12
Requires: perl >= 4:5.8.1
Requires(preun): %{_sbindir}/alternatives
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives chkconfig coreutils
Requires(post): %{_sbindir}/alternatives chkconfig coreutils
%description -n genisoimage
The genisoimage program is used as a pre-mastering program; i.e., it
@ -58,9 +56,8 @@ Group: Applications/Multimedia
Summary: A utility for sampling/copying .wav files from digital audio CDs
Obsoletes: cdda2wav < 9:2.01-12
Provides: cdda2wav = 9:2.01-12
Requires(preun): %{_sbindir}/alternatives
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives chkconfig coreutils
Requires(post): %{_sbindir}/alternatives chkconfig coreutils
%description -n icedax
Icedax is a sampling utility for CD-ROM drives that are capable of
@ -92,11 +89,25 @@ rm -rf $RPM_BUILD_ROOT
cd fedora
make install DESTDIR=$RPM_BUILD_ROOT
perl -pi -e 's#^require v5.8.1;##g' $RPM_BUILD_ROOT%{_bindir}/dirsplit
ln -s genisoimage $RPM_BUILD_ROOT%{_bindir}/mkisofs
ln -s genisoimage $RPM_BUILD_ROOT%{_bindir}/mkhybrid
ln -s icedax $RPM_BUILD_ROOT%{_bindir}/cdda2wav
ln -s wodim $RPM_BUILD_ROOT%{_bindir}/cdrecord
ln -s wodim $RPM_BUILD_ROOT%{_bindir}/dvdrecord
%clean
rm -rf $RPM_BUILD_ROOT
%post -n wodim
link=`readlink %{_bindir}/cdrecord`
if [ "$link" == "%{_bindir}/wodim" ]; then
rm -f %{_bindir}/cdrecord
fi
link=`readlink %{_bindir}/dvdrecord`
if [ "$link" == "wodim" ]; then
rm -f %{_bindir}/dvdrecord
fi
%{_sbindir}/alternatives --install %{_bindir}/cdrecord cdrecord \
%{_bindir}/wodim 50 \
--slave %{_mandir}/man1/cdrecord.1.gz cdrecord-cdrecordman \
@ -114,6 +125,11 @@ if [ $1 = 0 ]; then
fi
%post -n genisoimage
link=`readlink %{_bindir}/mkisofs`
if [ "$link" == "genisoimage" ]; then
rm -f %{_bindir}/mkisofs
fi
%{_sbindir}/alternatives --install %{_bindir}/mkisofs mkisofs \
%{_bindir}/genisoimage 50 \
--slave %{_mandir}/man1/mkisofs.1.gz mkisofs-mkisofsman \
@ -126,6 +142,10 @@ if [ $1 = 0 ]; then
fi
%post -n icedax
link=`readlink %{_bindir}/cdda2wav`
if [ "$link" == "icedax" ]; then
rm -f %{_bindir}/cdda2wav
fi
%{_sbindir}/alternatives --install %{_bindir}/cdda2wav cdda2wav \
%{_bindir}/icedax 50 \
--slave %{_mandir}/man1/cdda2wav.1.gz cdda2wav-cdda2wavman \
@ -142,6 +162,8 @@ fi
%doc doc/READMEs doc/wodim
%{_bindir}/devdump
%{_bindir}/wodim
%ghost %{_bindir}/cdrecord
%ghost %{_bindir}/dvdrecord
%{_bindir}/readom
%{_sbindir}/netscsid
%{_mandir}/man1/devdump.*
@ -152,6 +174,7 @@ fi
%defattr(-,root,root)
%doc doc/icedax COPYING
%{_bindir}/icedax
%ghost %{_bindir}/cdda2wav
%{_bindir}/cdda2mp3
%{_bindir}/cdda2ogg
%{_mandir}/man1/icedax.*
@ -162,6 +185,8 @@ fi
%defattr(-,root,root)
%doc doc/genisoimage COPYING
%{_bindir}/genisoimage
%ghost %{_bindir}/mkisofs
%ghost %{_bindir}/mkhybrid
%{_bindir}/isodebug
%{_bindir}/isodump
%{_bindir}/isoinfo
@ -180,6 +205,11 @@ fi
%{_mandir}/man1/readmult.*
%changelog
* Fri Sep 21 2007 Harald Hoyer <harald@redhat.com> - 1.1.6-4
- play stupid tricks, to let alternatives make the links and
rpm not removing them afterwards
- removed bogus warning for "." and ".."
* Thu Sep 20 2007 Harald Hoyer <harald@redhat.com> - 1.1.6-3
- fixed rhbz#248262
- switched to alternatives

View File

@ -1,7 +1,6 @@
diff -ur cdrkit-1.1.6/genisoimage/tree.c cdrkit-1.1.2/genisoimage/tree.c
--- cdrkit-1.1.6/genisoimage/tree.c 2007-09-20 16:05:13.000000000 +0200
+++ cdrkit-1.1.2/genisoimage/tree.c 2007-09-20 16:04:52.000000000 +0200
@@ -1596,12 +1602,10 @@
--- cdrkit-1.1.6/genisoimage/tree.c.dlength 2007-09-21 08:38:50.000000000 +0200
+++ cdrkit-1.1.6/genisoimage/tree.c 2007-09-21 08:41:23.000000000 +0200
@@ -1596,12 +1596,12 @@ insert_file_entry(struct directory *this
!S_ISFIFO(lstatbuf.st_mode) && !S_ISSOCK(lstatbuf.st_mode) &&
!S_ISLNK(lstatbuf.st_mode) && !S_ISREG(lstatbuf.st_mode) &&
!S_ISDIR(lstatbuf.st_mode)) {
@ -11,11 +10,12 @@ diff -ur cdrkit-1.1.6/genisoimage/tree.c cdrkit-1.1.2/genisoimage/tree.c
- filetype((int) lstatbuf.st_mode), whole_path);
- return (0);
- }
+ fprintf(stderr,
+ "Unknown file type (%s) %s - ignoring and continuing.\n",
+ filetype((int) lstatbuf.st_mode), whole_path);
+ if ( ! (this_dir == root && strcmp(short_name, "..") == 0)) {
+ fprintf(stderr,
+ "Unknown file type (%s) %s - ignoring and continuing.\n",
+ filetype((int) lstatbuf.st_mode), whole_path);
+ }
+ return (0);
}
/* Who knows what trash this is - ignore and continue */