%define tarball xf86-video-openchrome
%define moduledir %(pkg-config xorg-server --variable=moduledir )
%define driverdir %{moduledir}/drivers
%define cvsdate xxxxxxx
%define with_xvmc 1
%define with_debug 0
Summary: Xorg X11 openchrome video driver
Name: xorg-x11-drv-openchrome
Version: 0.2.904
Release: 3%{?dist}
URL: http://www.openchrome.org
License: MIT
Group: User Interface/X Hardware Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://www.openchrome.org/releases/%{tarball}-%{version}.tar.bz2
Source1: openchrome.xinf
# Patches from upstream trunk :
# svn diff -x -p http://svn.openchrome.org/svn/tags/release_0_2_904 http://svn.openchrome.org/svn/trunk
Patch0: openchrome-0.2.904-latest_trunk.patch
# svn diff -x -p -r853:854 http://svn.openchrome.org/svn/trunk
patch1: openchrome-0.2.904-fix_dri_on_64_bits.patch
# EPEL specific patches :
# Experimental patches (branch backport, etc...):
Patch13: openchrome-0.2.904-fix_tvout_flickering.patch
Patch20: openchrome-0.2.904-I420_Xv_surface_for_CME.patch
ExclusiveArch: %{ix86} x86_64
BuildRequires: pkgconfig
BuildRequires: xorg-x11-server-sdk
BuildRequires: automake
BuildRequires: libtool
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: mesa-libGL-devel
%if %{with_xvmc}
BuildRequires: libXvMC-devel
%endif
BuildRequires: libdrm-devel >= 2.0-1
Requires: xorg-x11-server-Xorg
%description
X.Org X11 openchrome video driver.
%if %{with_xvmc}
%package devel
Summary: Xorg X11 openchrome video driver XvMC development package
Group: Development/System
Requires: %{name} = %{version}-%{release}
%description devel
X.Org X11 openchrome video driver XvMC development package.
%endif
%prep
%setup -q -n %{tarball}-%{version}
%patch0 -p0
%patch1 -p0
%patch13 -p0
%patch20 -p1
%build
%configure --disable-static --enable-dri \
%if %{with_debug}
--enable-debug --enable-xv-debug
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hwdata/videoaliases
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/hwdata/videoaliases/openchrome.xinf
# FIXME: Remove all libtool archives (*.la) from modules directory. This
# should be fixed in upstream Makefile.am or whatever.
find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f --
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING NEWS README
%{driverdir}/openchrome_drv.so
%{_datadir}/hwdata/videoaliases/openchrome.xinf
%if %{with_xvmc}
%{_libdir}/libchromeXvMC.so.1
%{_libdir}/libchromeXvMC.so.1.0.0
%{_libdir}/libchromeXvMCPro.so.1
%{_libdir}/libchromeXvMCPro.so.1.0.0
%endif
%{_mandir}/man4/openchrome.4.gz
%if %{with_xvmc}
%files devel
%defattr(-,root,root,-)
%{_libdir}/libchromeXvMC.so
%{_libdir}/libchromeXvMCPro.so
%endif
%changelog
* Thu Jun 10 2010 Xavier Bachelot <xavier@bachelot.org> - 0.2.904-3
- Add upstream fix for a regression with DRI on 64 bits.
- Clean up spec indentation.
* Sat May 08 2010 Xavier Bachelot <xavier@bachelot.org> - 0.2.904-2
- Sync with trunk (r853) and drop patches accordingly.
- Fix TV out flickering regression.
- Add Xv acceleration for I420 on CME engine.
* Wed Dec 30 2009 Xavier Bachelot <xavier@bachelot.org> - 0.2.904-1
- Update to 0.2.904.
- Revert a change that breaks with xserver 1.4.
- Add patch to sync pci ids with trunk.
* Thu Dec 04 2008 Xavier Bachelot <xavier@bachelot.org> - 0.2.903-1
- Update to 0.2.903.
- Add patch for VT1625 640x480 PAL mode.
- Add patch to allow full HD resolution output with DDR400.
- Add patch to sync pci ids with trunk.
* Sun Jan 27 2008 Xavier Bachelot <xavier@bachelot.org> - 0.2.901-2
- Add patch to properly set fifo on P4M900.
* Wed Jan 02 2008 Xavier Bachelot <xavier@bachelot.org> - 0.2.901-1
- Update to 0.2.901.
- Remove obsoleted patches.
* Fri Nov 02 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-7
- Replace broken VT1625 NTSC patch.
- Add patch to announce as release not as development build.
- First official Fedora build.
* Thu Oct 18 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-6
- Update to official 0.2.900
* Wed Oct 10 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-5
- Update to release_0_3_0 branch rev. 410
- Add VT1625 patch for 720x576 PAL
* Mon Sep 10 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-4
- Update to release_0_3_0 branch rev. 384 plus all changes from experimental
merged back
- Remove upstream patch #2
* Wed Aug 01 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-3
- Update to release_0_3_0 branch rev. 380 (fix a bug with XvMC acceleration)
- Add a patch to allow proper detection of DDR667 (patch #2)
* Mon Jul 16 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-2
- Update to release_0_3_0 branch rev. 373
- Add release notes to %%doc
* Thu Jul 05 2007 Xavier Bachelot <xavier@bachelot.org> - 0.2.900-1
- Initial build (release_0_3_0 branch rev. 365)
- Add some NTSC modes for the VT1625 (patch #1)