--- cdparanoia.spec.orig 2006-07-12 06:45:59.000000000 +0200
+++ cdparanoia.spec 2007-08-31 18:00:00.000000000 +0200
@@ -1,12 +1,12 @@
-%define ver 9.8
-%define realver alpha%{ver}
-
+Summary: Compact Disc Digital Audio (CDDA) extraction tool (or ripper)
Name: cdparanoia
-Version: %{realver}
-Release: 27.2
-License: GPL
+Version: alpha9.8
+Release: 28
+# Only main.c would be GPLv2+, all other files explicitly state v2
+License: GPLv2
Group: Applications/Multimedia
-Source: http://www.xiph.org/paranoia/download/%{name}-III-%{realver}.src.tgz
+URL: http://www.xiph.org/paranoia/index.html
+Source: http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-%{version}.src.tgz
Patch0: cdparanoia-III-alpha9.8.nostrip.patch
Patch1: cdparanoia-III-alpha9.8.labels.patch
Patch2: cdparanoia-III-alpha9.8.O_EXCL.patch
@@ -18,13 +18,12 @@ Patch7: cdparanoia-III-alpha9.8.verbosit
Patch8: cdparanoia-III-alpha9.8.env.patch
Patch9: cdparanoia-III-alpha9.8.smalldma.patch
Patch10: cdparanoia-III-alpha9.8.lm.patch
-Url: http://www.xiph.org/paranoia/index.html
-BuildRoot: %{_tmppath}/cdparanoia-%{version}-root
-Requires: cdparanoia-libs = %{version}-%{release}
-Obsoletes: cdparanoia-III
-Summary: A Compact Disc Digital Audio (CDDA) extraction tool (or ripper).
+Patch11: cdparanoia-III-alpha9.8.install.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Requires: %{name}-libs = %{version}-%{release}
+Obsoletes: cdparanoia-III <= alpha9.8
-%description
+%description
Cdparanoia (Paranoia III) reads digital audio directly from a CD, then
writes the data to a file or pipe in WAV, AIFC or raw 16 bit linear
PCM format. Cdparanoia doesn't contain any extra features (like the ones
@@ -34,25 +33,25 @@ drives prone to misalignment, frame jitt
atomic reads. Cdparanoia is also good at reading and repairing data from
damaged CDs.
-%package -n cdparanoia-devel
-Summary: Development tools for libcdda_paranoia (Paranoia III).
+%package libs
+Summary: Libraries for cdparanoia (Paranoia III)
Group: Development/Libraries
-Requires: cdparanoia-libs = %{version}-%{release}
-%description -n cdparanoia-devel
-The cdparanoia-devel package contains the static libraries and header
-files needed for developing applications to read CD Digital Audio disks.
+%description libs
+The cdparanoia-libs package contains the dynamic libraries needed for
+applications which read CD Digital Audio disks.
-%package -n cdparanoia-libs
-Summary: Libraries for libcdda_paranoia (Paranoia III).
+%package devel
+Summary: Development file for cdparanoia (Paranoia III)
Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
-%description -n cdparanoia-libs
-The cdparanoia-libs package contains the dynamic libraries needed for
-applications which read CD Digital Audio disks.
+%description devel
+The cdparanoia-devel package contains the static libraries and header
+files needed for developing applications to read CD Digital Audio disks.
%prep
-%setup -q -n %{name}-III-%{realver}
+%setup -q -n %{name}-III-%{version}
%patch4 -p1 -b .sgio
%patch0 -p1 -b .nostrip
%patch1 -p1 -b .labels
@@ -64,65 +63,51 @@ applications which read CD Digital Audio
%patch8 -p1 -b .env
%patch9 -p1 -b .smalldma
%patch10 -p1 -b .lm
+%patch11 -p1 -b .install
%build
-rm -rf $RPM_BUILD_ROOT
-export OPT="${CFLAGS:-%optflags} -O0 -Wno-pointer-sign -Wno-unused"
%configure --includedir=%{_includedir}/cdda
-make OPT="$OPT"
+# Using -O0 is mandatory, the build fails otherwise...
+# Also remove many warnings which we are aware of
+# Last, don't use _smp_mflags since it also makes the build fail
+make OPT="$RPM_OPT_FLAGS -O0 -Wno-pointer-sign -Wno-unused"
%install
rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_includedir}/cdda
-install -d $RPM_BUILD_ROOT%{_libdir}
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-install -m 0755 cdparanoia $RPM_BUILD_ROOT%{_bindir}
-install -m 0644 cdparanoia.1 $RPM_BUILD_ROOT%{_mandir}/man1/
-install -m 0644 utils.h paranoia/cdda_paranoia.h interface/cdda_interface.h \
- $RPM_BUILD_ROOT%{_includedir}/cdda
-install -m 0755 paranoia/libcdda_paranoia.so.0.%{ver} \
- interface/libcdda_interface.so.0.%{ver} \
- $RPM_BUILD_ROOT%{_libdir}
-install -m 0755 paranoia/libcdda_paranoia.a interface/libcdda_interface.a \
- $RPM_BUILD_ROOT%{_libdir}
-
-/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
-
-pushd $RPM_BUILD_ROOT%{_libdir}
-ln -s libcdda_paranoia.so.0.%{ver} libcdda_paranoia.so
-ln -s libcdda_interface.so.0.%{ver} libcdda_interface.so
-popd
-
-%post -n cdparanoia-libs
-/sbin/ldconfig
-
-%postun -n cdparanoia-libs
-if [ "$1" -ge "1" ]; then
- /sbin/ldconfig
-fi
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%clean
-[ "$RPM_BUILD_ROOT" != "/" -a -d "$RPM_BUILD_ROOT" ] && rm -rf "$RPM_BUILD_ROOT"
+rm -rf $RPM_BUILD_ROOT
+
+%post libs -p /sbin/ldconfig
-%files -n cdparanoia
-%defattr(-,root,root)
+%postun libs -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
%doc README GPL FAQ.txt
-%{_bindir}/*
-%{_mandir}/man1/*
+%{_bindir}/cdparanoia
+%{_mandir}/man1/cdparanoia.1*
-%files -n cdparanoia-libs
-%defattr(-,root,root)
-%{_libdir}/*.so*
-
-%files -n cdparanoia-devel
-%defattr(-,root,root)
-%{_includedir}/cdda
-%{_includedir}/cdda/*
-%{_libdir}/*.a
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/cdda/
+%{_libdir}/*.so
%changelog
+* Fri Aug 31 2007 Matthias Saou alpha9.8-28
+- Move .so symlink to the devel sub-package.
+- Reorder and clean up the spec file.
+- Remove use of "ver" and "realver".
+- Convert spec file to UTF-8 and escape all macros in changelog.
+- Add highest known version to the cdparanoia-III obsoletes.
+- Include install patch to have DESTDIR work and libs +x for correct debuginfo.
+
* Wed Jul 12 2006 Jesse Keating - alpha9.8-27.2
- rebuild
@@ -130,7 +115,7 @@ fi
- bump again for double-long bug on ppc(64)
* Wed Feb 08 2006 Monty Montgomery - alpha9.8-27
-- rebuilt
+- rebuilt
* Tue Feb 07 2006 Jesse Keating - alpha9.8-26.2
- rebuilt for new gcc4.1 snapshot and glibc changes
@@ -152,7 +137,7 @@ fi
* Fri Oct 1 2004 Peter Jones alpha9.8-23
- "This time, with a meaningful changelog" release. Just like -22.
-- new SG_IO code in rawhide. This means ripping will no longer use the
+- new SG_IO code in rawhide. This means ripping will no longer use the
"cooked ioctl" mode that it has since we moved to 2.6, instead utilizing
the real scsi-based command set to talk to most drives. This should
result in better error correction handling, and usage of much more
@@ -163,7 +148,7 @@ fi
- It'd be good if this got some testing. A prior version of the SG_IO code
was known to fail on some USB drives. This version should mitigate that
quite a bit, but I lack the hardware to test it for sure.
-
+
* Wed Jul 7 2004 Peter Jones alpha9.8-21sgio1
- a new set of sgio patches
@@ -174,7 +159,7 @@ fi
- rebuilt
* Tue Feb 17 2004 Peter Jones alpha9.8-20
-- take ownership of %{_includedir}/cdda
+- take ownership of %%{_includedir}/cdda
* Fri Feb 13 2004 Elliot Lee
- rebuilt
@@ -215,7 +200,7 @@ fi
- fix broken Obsoletes of cdparanoia-devel
* Thu Dec 6 2001 Peter Jones alpha9.8-6
-- move includes to %{_includedir}/cdda/
+- move includes to %%{_includedir}/cdda/
- add utils.h to %%install
- clean up %%install some.
@@ -228,7 +213,7 @@ fi
- reverse devel dependency
* Wed Aug 1 2001 Peter Jones
-- fix %post and %postun to only run ldconfig for devel packages
+- fix %%post and %%postun to only run ldconfig for devel packages
* Wed Jul 18 2001 Crutcher Dunnavant
- devel now depends on package
@@ -242,7 +227,7 @@ fi
* Thu Dec 7 2000 Crutcher Dunnavant
- rebuild for new tree
-* Fri Jul 21 2000 Trond Eivind Glomsrød
+* Fri Jul 21 2000 Trond Eivind Glomsrød
- use %%{_tmppath}
* Wed Jul 12 2000 Prospector
@@ -252,19 +237,19 @@ fi
- revert name change
- use new rpm macro paths
-* Wed Apr 19 2000 Trond Eivind Glomsrød
+* Wed Apr 19 2000 Trond Eivind Glomsrød
- Switched spec file from the one used in Red Hat Linux 6.2, which
also changes the name
- gzip man page
* Thu Dec 23 1999 Peter Jones
-- update package to provide cdparanoia-alpha9.7-2.*.rpm and
+- update package to provide cdparanoia-alpha9.7-2.*.rpm and
cdparanoia-devel-alpha9.7-2.*.rpm. Also, URLs point at xiph.org
like they should.
* Wed Dec 22 1999 Peter Jones
- updated package for alpha9.7, based on input from:
- Monty
+ Monty
David Philippi
* Mon Apr 12 1999 Michael Maher