%define tarball xf86-video-v4l
%define moduledir %(pkg-config xorg-server --variable=moduledir )
%define driverdir	%{moduledir}/drivers

Summary:   Xorg X11 v4l video driver
Summary(ja):   Xorg X11 v4l ビデオドライバ
Name:      xorg-x11-drv-v4l
Version:   0.2.0
Release:   8%{?_dist_release}
URL:       http://www.x.org
License:   MIT
Group:     User Interface/X Hardware Support

Source0:   ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: xorg-x11-server-sdk >= 1.6
Requires:  xorg-x11-server-Xorg

%description 
X.Org X11 v4l video driver.

%prep
%setup -q -n %{tarball}-%{version}

%build
%configure --disable-static
make

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# 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,-)
%{driverdir}/v4l_drv.so
%{_mandir}/man4/v4l.4*

%changelog
* Wed Nov 02 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.0-8
- rebuild with xserver-1.11.1.902

* Mon Feb 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.0-7
- rebuild with xserver-1.10.0

* Sun Nov 07 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.0-6
- rebuild with xserver-1.9.2

* Sun Mar 28 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.0-5
- rebuild with xserver-1.8rc

* Sat Nov 21 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.2.0-4
- rebuild with xorg-server-1.7.1

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.2.0-3
- rebuild with xorg-server-1.6

* Fri Jul 04 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.2.0-2
- rebuild with xorg-server-1.4.99

* Mon Jun 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.2.0-1
- new upstream release

* Sun May 18 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.1.1-1
- new versioning policy

* Tue Jan 22 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.1.1-0vl1
- initial build for Vine Linux

* Tue Aug 28 2007 Adam Jackson <ajax@redhat.com> 0.1.1-8
- Fix ioctl argument on LP64 machines. (#250070)

* Thu Aug 23 2007 Adam Jackson <ajax@redhat.com> - 0.1.1-7
- Rebuild for ppc toolchain bug

* Mon Jun 18 2007 Adam Jackson <ajax@redhat.com> 0.1.1-6
- Update Requires and BuildRequires.  Disown the module directories.

* Fri Feb 16 2007 Adam Jackson <ajax@redhat.com> 0.1.1-5
- ExclusiveArch -> ExcludeArch

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.1.1-4
- rebuild

* Tue May 23 2006 Adam Jackson <ajackson@redhat.com> 0.1.1-3
- Rebuild for 7.1 ABI fix.

* Fri May 19 2006 Mike A. Harris <mharris@redhat.com> 0.1.1-2
- Added "BuildRequires: xorg-x11-proto-devel" for (#192386)

* Sun Apr  9 2006 Adam Jackson <ajackson@redhat.com> 0.1.1-1
- Update to 0.1.1 from 7.1RC1.

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> 0.0.1.5-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Wed Jan 18 2006 Mike A. Harris <mharris@redhat.com> 0.0.1.5-1
- Updated xorg-x11-drv-v4l to version 0.0.1.5 from X11R7.0

* Tue Dec 20 2005 Mike A. Harris <mharris@redhat.com> 0.0.1.4-1
- Updated xorg-x11-drv-v4l to version 0.0.1.4 from X11R7 RC4
- Removed 'x' suffix from manpage dirs to match RC4 upstream.

* Fri Nov 4 2005 Mike A. Harris <mharris@redhat.com> 0.0.1.1-1
- Updated xorg-x11-drv-v4l to version 0.0.1.1 from X11R7 RC1.  For some
  unknown reason, the version went backwards from 4.0.0 to 0.0.1.1.
- Fix *.la file removal.

* Mon Oct 3 2005 Mike A. Harris <mharris@redhat.com> 4.0.0-1
- Initial spec file for v4l video driver forked from cirrus driver package.
