- Incorporate changes from Matthias Saou:

- Include install patch, to avoid all of the ugly manual installation.
- Cosmetic fixes (libs group, scriplets, don't mix %name with hardcode...).
This commit is contained in:
Peter Jones 2010-02-03 18:38:03 +00:00
parent 3b035bb8a5
commit 0ef859f2ed
2 changed files with 84 additions and 43 deletions

View File

@ -0,0 +1,50 @@
diff -Naupr cdparanoia-III-10.2.orig/Makefile.in cdparanoia-III-10.2/Makefile.in
--- cdparanoia-III-10.2.orig/Makefile.in 2008-09-11 22:33:30.000000000 +0200
+++ cdparanoia-III-10.2/Makefile.in 2008-12-22 22:31:45.578372040 +0100
@@ -63,28 +63,28 @@ slib:
cd paranoia && $(MAKE) slib
install:
- $(INSTALL) -d -m 0755 $(BINDIR)
- $(INSTALL) -m 755 $(srcdir)/cdparanoia $(BINDIR)
- $(INSTALL) -d -m 0755 $(MANDIR)
- $(INSTALL) -d -m 0755 $(MANDIR)/man1
- $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1
- $(INSTALL) -d -m 0755 $(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR)
- $(INSTALL) -d -m 0755 $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/utils.h $(INCLUDEDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(srcdir)/cdparanoia $(DESTDIR)$(BINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0755 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0755 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR)
ln -fs libcdda_interface.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_interface.so.0
+ $(DESTDIR)$(LIBDIR)/libcdda_interface.so.0
ln -fs libcdda_interface.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_interface.so
+ $(DESTDIR)$(LIBDIR)/libcdda_interface.so
ln -fs libcdda_paranoia.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_paranoia.so.0
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so.0
ln -fs libcdda_paranoia.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_paranoia.so
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so
cdparanoia: $(OFILES) $(LIBDEP)
$(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \

View File

@ -1,18 +1,19 @@
Summary: Compact Disc Digital Audio (CDDA) extraction tool (or ripper)
Name: cdparanoia
Version: 10.2
Release: 7%{?dist}
Release: 8%{?dist}
# the app is GPLv2, everything else is LGPLv2
License: GPLv2 and LGPLv2
Group: Applications/Multimedia
URL: http://www.xiph.org/paranoia/index.html
Source: http://downloads.xiph.org/releases/%{name}/%{name}-III-%{version}.src.tgz
Source: http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-%{version}.src.tgz
# Patch from upstream to fix cdda_interface.h C++ incompatibility ("private")
# https://trac.xiph.org/changeset/15338
# https://bugzilla.redhat.com/show_bug.cgi?id=463009
Patch0: cdparanoia-10.2-#463009.patch
# #466659
Patch1: cdparanoia-10.2-endian.patch
Patch2: cdparanoia-10.2-install.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: cdparanoia-libs = %{version}-%{release}
Obsoletes: cdparanoia-III <= alpha9.8
@ -27,16 +28,6 @@ drives prone to misalignment, frame jitter and loss of streaming during
atomic reads. Cdparanoia is also good at reading and repairing data from
damaged CDs.
%package devel
Summary: Development tools for libcdda_paranoia (Paranoia III)
Group: Development/Libraries
Requires: cdparanoia-libs = %{version}-%{release}
License: LGPLv2
%description devel
The cdparanoia-devel package contains the libraries and header files needed
for developing applications to read CD Digital Audio disks.
%package static
Summary: Development tools for libcdda_paranoia (Paranoia III)
Group: Development/Libraries
@ -49,59 +40,54 @@ developing applications to read CD Digital Audio disks.
%package libs
Summary: Libraries for libcdda_paranoia (Paranoia III)
Group: Development/Libraries
Group: Applications/Multimedia
License: LGPLv2
%description libs
The cdparanoia-libs package contains the dynamic libraries needed for
applications which read CD Digital Audio disks.
%package devel
Summary: Development tools for libcdda_paranoia (Paranoia III)
Group: Development/Libraries
Requires: cdparanoia-libs = %{version}-%{release}
License: LGPLv2
%description devel
The cdparanoia-devel package contains the libraries and header files needed
for developing applications to read CD Digital Audio disks.
%prep
%setup -q -n %{name}-III-%{version}
%setup -q -n cdparanoia-III-%{version}
%patch0 -p3 -b .#463009
%patch1 -p1 -b .endian
%patch2 -p1 -b .install
%build
export OPT="${CFLAGS:-%optflags} -O0 -Wno-pointer-sign -Wno-unused -Werror-implicit-function-declaration"
%configure --includedir=%{_includedir}/cdda
make OPT="$OPT"
# Using -O0 is mandatory, the build fails otherwise...
# Also remove many warnings which we are aware of
# Lastly, 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.10.? \
interface/libcdda_interface.so.0.10.? \
$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.10.? libcdda_paranoia.so
ln -s libcdda_interface.so.0.10.? libcdda_interface.so
popd
%post -n cdparanoia-libs -p /sbin/ldconfig
%postun -n cdparanoia-libs -p /sbin/ldconfig
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING* README
%{_bindir}/*
%{_mandir}/man1/*
%{_bindir}/cdparanoia
%{_mandir}/man1/cdparanoia.1*
%files libs
%defattr(-,root,root)
@ -109,7 +95,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(-,root,root)
%{_includedir}/cdda
%{_includedir}/cdda/
%{_libdir}/*.a
%{_libdir}/*.so
@ -118,6 +104,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a
%changelog
* Wed Feb 03 2010 Peter Jones <pjones@redhat.com> - 10.2-8
- Incorporate changes from Matthias Saou:
- Include install patch, to avoid all of the ugly manual installation.
- Cosmetic fixes (libs group, scriplets, don't mix %%name with hardcode...).
* Tue Feb 02 2010 Adam Jackson <ajax@redhat.com> 10.2-7
- Move static libs to -static subpackage, make it require -devel