File ivtv.spec of Package ivtv

#
# spec file for package ivtv (Version 1.4.0)
#
# Copyright (c) 2010 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:           ivtv
BuildRequires:  gcc-c++ kernel-source kernel-syms module-init-tools
Url:            http://ivtvdriver.org/index.php/Main_Page
License:        GPLv2+
Group:          Productivity/Multimedia/Other
AutoReqProv:    on
ExclusiveArch:  %ix86 ppc ppc64 x86_64
Version:        1.4.0
Release:        1
Summary:        Driver Implementation for iCompression or Conexant Video Capture Cards
Source0:        %{name}-utils-%{version}.tar.bz2
Source1:        ivtv-firmware.tar.gz
Source2:        preamble
Patch0:         ivtv-optflags.patch
Patch1:         ivtv-splice.patch
Patch2:         ivtv-buffer.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The primary goal of the IVTV project is to provide a "clean room" Linux
open source driver implementation for video capture cards based on the
iCompression iTVC15 or Conexant CX23415/CX23416 MPEG Codec. Examples of
such cards are the Hauppauge PVR 250/350 series of MPEG video capture
cards, the Hauppauge "freestyle", and the AVerMedia M179 AVerTV. The
freestyle has not been tested, but it should work or at least be easy
to get working.



Authors:
--------
    Hans Verkuil
    Chris Kennedy

%package firmware
Group:          Productivity/Multimedia/Other
License:        No license agreement found in package
Summary:        driver implementation for iCompression or Conexant video capture cards
# for cx8802
Supplements:    modalias(pci:v000014F1d00008802sv*sd*bc*sc*i*)
# for pvrusb2
Supplements:    modalias(usb:v2040p7501d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v2040p7500d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v2040p7300d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v11BAp1001d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v11BAp1003d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v1164p0602d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v1164p0622d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v2040p2400d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v2040p2950d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v2040p2900d*dc*dsc*dp*ic*isc*ip*)
# for ivtv
Supplements:    modalias(pci:v00004444d00000016sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00004444d00000803sv*sd*bc*sc*i*)

%description firmware
The primary goal of the IVTV project is to provide a "clean room" Linux
Open Source driver implementation for video capture cards based on the
iCompression iTVC15 or Conexant CX23415/CX23416 MPEG Codec. Examples of
such cards are the Hauppauge PVR 250/350 series of MPEG video capture
cards, the Hauppauge "freestyle" and the AVerMedia M179 AVerTV. The
freestyle hasn't been tested, but it should work, or at least be easy
to get working.



Authors:
--------
    Hans Verkuil
    Chris Kennedy

%prep
%setup -q -c -n firmware -T -D -a 1
%setup -q -n ivtv-utils-%{version} -D
%patch0
%patch1
%patch2

%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
# build utils
make -C utils

%install
# install utils
mkdir -p "%{buildroot}/usr/bin"
make -C utils DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr install
# install firmware
mkdir -p "%{buildroot}/lib/firmware"
cp -v ../firmware/* "%{buildroot}/lib/firmware"
#
rm -fv doc/install.txt.orig
# not packaged ATM
rm -f %{buildroot}/usr/include/linux/ivtv.h
rm -f %{buildroot}/usr/include/linux/ivtvfb.h

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING README ChangeLog doc utils/ivtvfwextract.pl
/usr/bin/*

%files firmware
%defattr(-,root,root)
%doc ../firmware/license*txt
/lib/firmware/*

%changelog