applied patch to improve build system

This commit is contained in:
ejcoumans
2007-08-16 05:30:23 +00:00
parent dae4a77589
commit b706ea5dfd
7 changed files with 73 additions and 433 deletions

View File

@@ -1,4 +1,4 @@
%define lib_version 1.0.1
%define lib_version 1.0.2
Summary: SIMD math library.
Name: simdmath
@@ -9,14 +9,18 @@ Group: System Environment/Libraries
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%define _enable_spu 0
%ifarch ppc
%define _arch 32
%define _arch ppu
%define _libdir %{_exec_prefix}/lib
%define _enable_spu 1
%endif
%ifarch ppc64
%define _arch 64
%define _arch ppu64
%define _libdir %{_exec_prefix}/lib64
%define _enable_spu 1
%endif
%define _spe_prefix %{_prefix}/spu
@@ -31,9 +35,11 @@ Summary: SIMD math library.
Group: Development/Libraries
Requires: %{name} = %{version}
%if %{_enable_spu}
%package -n spu-%{name}-devel
Summary: SIMD math library.
Group: Development/Libraries
%endif
%description
SIMD math library.
@@ -41,31 +47,45 @@ SIMD math library.
%description -n %{name}-devel
SIMD math library.
%if %{_enable_spu}
%description -n spu-%{name}-devel
SIMD math library.
%endif
%prep
%setup -q
%build
make CROSS_PPU= ARCH_PPU=%{_arch}
make ARCH=%{_arch}
%if %{_enable_spu}
make ARCH=spu
%endif
%install
rm -rf %{buildroot}
make CROSS_PPU= ARCH_PPU=%{_arch} DESTDIR=%{buildroot} install
make ARCH=%{_arch} DESTDIR=%{buildroot} install
%if %{_enable_spu}
make ARCH=spu DESTDIR=%{buildroot} install
%endif
if [ "%{_libdir}" != /usr/lib ]; then
mv %{buildroot}/usr/lib %{buildroot}%{_libdir}
fi
mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version}
cp README LICENSE %{buildroot}/%{_docdir}/%{name}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_docdir}/*
%files -n %{name}-devel
%defattr(-,root,root,-)
@@ -73,12 +93,16 @@ rm -rf %{buildroot}
%{_libdir}/*.a
%{_libdir}/*.so
%if %{_enable_spu}
%files -n spu-%{name}-devel
%defattr(-,root,root,-)
%{_spe_includedir}/*
%{_spe_libdir}/*
%endif
%changelog
* Fri Aug 25 2006 Kazunori Asayama <asayama@sm.sony.co.jp> -
- Initial build.
* Thu Aug 9 2007 Kazunori Asayama <asayama@sm.sony.co.jp> - 1.0.1-2
- Add documents.
* Fri Aug 25 2006 Kazunori Asayama <asayama@sm.sony.co.jp> - 1.0.1-1
- Initial build.