File DirectFB.spec of Package DirectFB

#
# spec file for package DirectFB (Version 1.2.8)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           DirectFB
BuildRequires:  freetype2-devel xorg-x11-libX11-devel xorg-x11-libXext-devel
BuildRequires:  libjpeg-devel libpng-devel libstdc++-devel sysfsutils udev
BuildRequires:  zlib-devel
%ifnarch s390 s390x
BuildRequires:  i2c-tools
%endif
# bug437293
%ifarch ppc64
Obsoletes:      DirectFB-64bit
%endif
#
Url:            http://www.directfb.org/
License:        LGPL v2.1 or later
Group:          System/Libraries
AutoReqProv:    on
Version:        1.2.8
Release:        1
Summary:        Graphics Library for Framebuffer Devices
Source:         %name-%version.tar.bz2
Patch2:         %name-0.9.24-matroxi2c.diff
Patch3:         %name-0.9.25-headers.patch
Patch4:         %name-cc-cflags.patch
Patch5:         %name-int.patch
Patch6:         %name-0.9.24-warning.patch
Patch8:         %name-0.9.25-comma.patch
Patch9:         %name-1.1.1.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
DirectFB is a thin library that provides hardware graphics
acceleration, input device handling and abstraction, an integrated
windowing system with support for translucent windows, and multiple
display layers on top of the Linux framebuffer device. It is a complete
hardware abstraction layer with software fallbacks for every graphics
operation that is not supported by the underlying hardware. DirectFB
adds graphical power to embedded systems and sets a new standard for
graphics under Linux.



Authors:
--------
    Denis Oliver Kropp <dok@directfb.org>
    Andreas Hundt <andi@fischlustig.de>
    Sven Neumann <neo@directfb.org>

%package devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/C and C++
Summary:        Graphics Library for Framebuffer Devices
Requires:       %{name} = %{version} glibc-devel zlib-devel /bin/sh

%description devel
DirectFB is a thin library that provides hardware graphics
acceleration, input device handling and abstraction, an integrated
windowing system with support for translucent windows, and multiple
display layers on top of the Linux framebuffer device. It is a complete
hardware abstraction layer with software fallbacks for every graphics
operation that is not supported by the underlying hardware. DirectFB
adds graphical power to embedded systems and sets a new standard for
graphics under Linux.



Authors:
--------
    Denis Oliver Kropp <dok@directfb.org>
    Andreas Hundt <andi@fischlustig.de>
    Sven Neumann <neo@directfb.org>

%package doc
License:        LGPL v2.1 or later
Summary:        Graphics Library for Framebuffer Devices Documentation
Group:          System/Libraries

%description doc
DirectFB documentation in html form.



Authors:
--------
    Denis Oliver Kropp <dok@directfb.org>
    Andreas Hundt <andi@fischlustig.de>
    Sven Neumann <neo@directfb.org>

%prep
%setup -q
%patch2 -p1
%patch3
%patch4 -p1
%patch5 -p1
%patch6
%patch8
%patch9

%build
%ifarch s390 s390x
	sed 's/-O3/-Os/' configure >c;chmod +x c;mv c configure;
%endif
#autoreconf -f -i
%suse_update_libdir configure
CC="gcc $RPM_OPT_FLAGS -fno-strict-aliasing" ./configure \
	--prefix=/usr --mandir=%_mandir --libdir=%_libdir \
        --enable-zlib --enable-rgb332 \
%ifarch x86_64
	--enable-mmx --enable-sse \
%endif
%ifarch ppc64 ppc
	--with-gfxdrivers="ati128 cle266 cyber5k i810 mach64 matrox neomagic nsc nvidia radeon sis315 tdfx unichrome" \
%endif
%ifarch s390 s390x
	--with-gfxdrivers=none --with-inputdrivers=none --disable-video4linux --disable-fbdev \
%endif
	--enable-linux-input --enable-x11 --enable-unique \
	--disable-gettid
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir  $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' | xargs rm -v

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
#%{_libdir}/directfb-1.0-0
/usr/share/directfb-%{version}
%{_bindir}/dfbg
%{_bindir}/dfbdump
%{_bindir}/dfbinfo
%{_bindir}/dfblayer
%{_bindir}/directfb-csource
%{_bindir}/dfbscreen
%{_bindir}/dfbinspector
%{_bindir}/dfbmaster
%{_bindir}/dfbfx
%{_bindir}/uwmdump
%{_bindir}/dfbinput
%{_bindir}/dfbpenmount
#%ifnarch s390 s390x ppc ppc64
#%{_bindir}/sh7722_jpegtool
#%{_libdir}/libsh7722_jpeg.*
#%endif
%{_libdir}/libdirect*.so.*
%{_libdir}/libfusion*.so.*
%{_libdir}/libuniquewm*.so.*
%{_libdir}/directfb-1.2-0
%{_bindir}/mkd*iff
%{_bindir}/directfb-config
%doc %_mandir/man1/dfbg.1.gz
%doc %_mandir/man1/directfb-csource.1.gz
%doc %_mandir/man5/directfbrc.5.gz

%files devel
%defattr(-,root,root)
%{_libdir}/libdirect*.so
%{_libdir}/libfusion*.so
%{_libdir}/libuniquewm*.so
/usr/include/directfb-internal
/usr/include/directfb
%{_libdir}/pkgconfig/*
#{_libdir}/lib*.la

%files doc
%defattr(-,root,root)
%doc docs/html/*.html
%doc docs/html/*.png

%changelog
openSUSE Build Service is sponsored by