SUNWlibsdl.spec
author davelam
Thu, 07 Aug 2008 02:31:31 +0000
branchgnome-2-22
changeset 12491 b2fc226f1836
parent 12235 2f701f76c8bd
child 13647 cd8e3bf73f1d
permissions -rw-r--r--
2008-08-07 Dave Lin <[email protected]> * closed/SUNWflash-player-plugin.spec: Hack the version number from 9.0.125 9.0.1250 to fix the integration issue, which was caused by the incorrect version number(9.0.1124 should be 9.0.124) in the previous version bump.

#
# spec file for package SUNWlibsdl
#
# includes module(s): libsdl
#
# Copyright 2007 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: davelam
#
%include Solaris.inc
%ifarch amd64 sparcv9
%include arch64.inc
%use sdl_64 = libsdl.spec
%endif

%if %arch_sse2
%include x86_sse2.inc
%use sdl_sse2 = libsdl.spec
%endif

%include base.inc
%use sdl = libsdl.spec

Name:        SUNWlibsdl
Summary:     %{sdl.summary}
Version:     %{sdl.version}
SUNW_BaseDir:%{_basedir}
SUNW_Copyright:%{name}.copyright
BuildRoot:   %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
BuildRequires: SUNWgnome-audio-devel
Requires: SUNWgnome-audio

%package devel
Summary:      %{summary} - development files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc

%prep
%ifnarch sparc
# Testing that the OpenGL headers and libs are installed.
# If this fails it means that the build machine is not properly configured
test -f /usr/X11/include/GL/glx.h || {
  echo "Missing OpenGL headers. Stopping."
  echo "As root, run: \"/lib/svc/method/ogl-select start\""
  false
  }
test -f /usr/X11/lib/modules/extensions/libglx.so  || {
  echo "Missing OpenGL libraries. Stopping."
  echo "As root, run: \"/lib/svc/method/ogl-select start\""
  false
  }
%endif

rm -rf %name-%version
mkdir %name-%version

%ifarch amd64 sparcv9
mkdir %name-%version/%_arch64
%sdl_64.prep -d %name-%version/%_arch64
%endif

%if %arch_sse2
mkdir %name-%version/%sse2_arch
%sdl_sse2.prep -d %name-%version/%sse2_arch
%endif

mkdir %name-%version/%base_arch
%sdl.prep -d %name-%version/%base_arch

%build
%ifarch amd64 sparcv9
%sdl_64.build -d %name-%version/%_arch64
%endif

%if %arch_sse2
%sdl_sse2.build -d %name-%version/%sse2_arch
%endif

%sdl.build -d %name-%version/%base_arch

%install
rm -rf $RPM_BUILD_ROOT

%ifarch amd64 sparcv9
%sdl_64.install -d %name-%version/%_arch64
%endif

%if %arch_sse2
%sdl_sse2.install -d %name-%version/%sse2_arch
%endif

%sdl.install -d %name-%version/%base_arch

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libSDL*.so*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%{_libdir}/%{_arch64}/lib*.so*
%endif
%if %arch_sse2
%dir %attr (0755, root, bin) %{_libdir}/%{sse2_arch}
%{_libdir}/%{sse2_arch}/lib*.so*
%endif
 
%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/sdl-config
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, bin) %{_mandir}
%dir %attr (0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*
%dir %attr (0755, root, other) %{_datadir}/aclocal
%{_datadir}/aclocal/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
%{_bindir}/%{_arch64}/*
%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
%{_libdir}/%{_arch64}/pkgconfig/*.pc
%endif
%if %arch_sse2
%dir %attr (0755, root, bin) %{_bindir}/%{sse2_arch}
%{_bindir}/%{sse2_arch}/*
%dir %attr (0755, root, other) %{_libdir}/%{sse2_arch}/pkgconfig
%{_libdir}/%{sse2_arch}/pkgconfig/*.pc
%endif

%changelog
* Wed Apr  4 2007 - [email protected]
- Create