Modernise spec, Generic 32/64bit platform detection

This commit is contained in:
Peter Robinson 2014-08-02 13:45:10 +01:00
parent 3169a6ea7d
commit 95f1313544
1 changed files with 6 additions and 13 deletions

View File

@ -1,13 +1,12 @@
Summary: Library for reading and writing sound files Summary: Library for reading and writing sound files
Name: libsndfile Name: libsndfile
Version: 1.0.25 Version: 1.0.25
Release: 10%{?dist} Release: 11%{?dist}
License: LGPLv2+ and GPLv2+ and BSD License: LGPLv2+ and GPLv2+ and BSD
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.mega-nerd.com/libsndfile/ URL: http://www.mega-nerd.com/libsndfile/
Source0: http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz Source0: http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz
Patch0: %{name}-1.0.25-system-gsm.patch Patch0: %{name}-1.0.25-system-gsm.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
BuildRequires: flac-devel BuildRequires: flac-devel
@ -56,8 +55,6 @@ This package contains command line utilities for libsndfile.
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
rm -r src/GSM610 ; autoreconf -I M4 -fiv # for system-gsm patch rm -r src/GSM610 ; autoreconf -I M4 -fiv # for system-gsm patch
#also for aarch64 support which requires autotools 2.69+
%build %build
%configure \ %configure \
@ -75,13 +72,12 @@ make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT __docs
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
cp -pR $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev/html __docs cp -pR $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev/html __docs
rm -rf $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev rm -rf $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev
# fix multilib issues # fix multilib issues
%ifarch x86_64 s390x ia64 ppc64 ppc64le sparc64 aarch64 %if %{__isa_bits} == 6
%define wordsize 64 %define wordsize 64
%else %else
%define wordsize 32 %define wordsize 32
@ -111,22 +107,16 @@ rm -f %{buildroot}%{_bindir}/sndfile-jackplay
LD_LIBRARY_PATH=$PWD/src/.libs make check LD_LIBRARY_PATH=$PWD/src/.libs make check
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%doc COPYING AUTHORS README NEWS %doc COPYING AUTHORS README NEWS
%{_libdir}/%{name}.so.* %{_libdir}/%{name}.so.*
%files utils %files utils
%defattr(-,root,root,-)
%{_bindir}/sndfile-cmp %{_bindir}/sndfile-cmp
%{_bindir}/sndfile-concat %{_bindir}/sndfile-concat
%{_bindir}/sndfile-convert %{_bindir}/sndfile-convert
@ -149,7 +139,6 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/sndfile-play.1* %{_mandir}/man1/sndfile-play.1*
%files devel %files devel
%defattr(-,root,root,-)
%doc __docs/* %doc __docs/*
%doc ChangeLog %doc ChangeLog
%exclude %{_libdir}/%{name}.la %exclude %{_libdir}/%{name}.la
@ -161,6 +150,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Aug 2 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-11
- Modernise spec
- Generic 32/64bit platform detection
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-10 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild