Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 60b8da5e9a8292c40c40fcdd4a8d901a > files > 7

em8300-0.18.0-7.mga3.src.rpm

Name:		em8300
Version:	0.18.0
Release:	%mkrel 7
URL:		http://dxr3.sourceforge.net/
Source0:	http://downloads.sourceforge.net/dxr3/%{name}-nofirmware-%{version}.tar.gz
Patch0:		em8300-2.6.36-1.patch
Patch1:		em8300-2.6.36-2.patch
Patch2:		em8300-2.6.36-3.patch
Patch3:		em8300-2.6.37-1.patch
Patch4:		em8300-link.patch
Group:		System/Kernel and hardware
License:	GPLv2+
BuildRequires:	gtk2-devel
# for /usr/share/alsa/alsa.conf
BuildRequires:	libalsa-data
Summary:	Utilities for Hollywood plus / DXR3 device driver for Linux
Provides:	perl(em8300)
Requires:	kmod(em8300)

%description
This package contains utilities that can be used by packages
developed for use with the Hollywood plus or DXR3 MPEG
decoder cards.

You'll also need the non-free microcode for the em8300
device to work, you must download that from
http://dxr3.sourceforge.net/download/em8300.bin to
/lib/firmware/.

%package devel
Summary: Development headers for DXR3 device
Group: Development/Other
BuildArch: noarch
Provides: %{name}-devel = %{version}-%{release}
Provides: libdxr3-devel = %{version}-%{release}

%description devel
This contains the development headers used when building an
application that will make use of the em8300 driver.

%package -n dkms-%{name}
Summary: Linux kernel module for Hollywood plus / DXR3 devices
Group: System/Kernel and hardware
BuildArch: noarch
Requires(post): dkms
Requires(preun): dkms
Requires: em8300

%description -n dkms-%{name}
This package contains the kernel module for the Hollywood plus
or DXR3 MPEG decoder cards.

Install this package if you wish to use such a card and do not
have the driver in your kernel. You should also install
package em8300.

%prep
%setup -q
%apply_patches

echo > README.install.urpmi <<EOF
EM8300-devices require a non-free microcode to operate. If you
have not already done so, you have to download
http://dxr3.sourceforge.net/download/em8300.bin to /lib/firmware/.
EOF

if [ -x modules/update_em8300_version.sh ]; then # is snapshot
	# Run by make during module build if it exists, uses hg which users do not have.
	rm modules/update_em8300_version.sh
	echo "#define EM8300_VERSION \"hg-rev-%snapshot\"" > modules/em8300_version.h
fi

%build
%configure2_5x
%make

%install
%makeinstall_std

mkdir -p %{buildroot}%{_udevrulesdir}
install -m644 modules/em8300-udev.rules \
	%{buildroot}%{_udevrulesdir}/%{name}.rules

install -d -m755 %{buildroot}/usr/src/%{name}-%{version}-%{release}
cp -a modules include %{buildroot}/usr/src/%{name}-%{version}-%{release}
rm -f %{buildroot}/usr/src/%{name}-%{version}-%{release}/modules/em8300-udev.rules
cat > %{buildroot}/usr/src/%{name}-%{version}-%{release}/dkms.conf <<EOF
PACKAGE_NAME="%{name}"
PACKAGE_VERSION="%{version}-%{release}"
MAKE[0]="cd modules && make KERNEL_LOCATION=\$kernel_source_dir KERNVER=\$kernelver"
CLEAN="cd modules && make clean"
BUILT_MODULE_NAME[0]="adv717x"
BUILT_MODULE_NAME[1]="bt865"
BUILT_MODULE_NAME[2]="em8300"
BUILT_MODULE_LOCATION[0]="modules"
BUILT_MODULE_LOCATION[1]="modules"
BUILT_MODULE_LOCATION[2]="modules"
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
AUTOINSTALL=yes
EOF

%post -n dkms-%{name}
dkms add     -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms build   -m %{name} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force
true

%preun -n dkms-%{name}
dkms remove  -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all
true

%files
%doc README AUTHORS ChangeLog.old modules/README-* modules/INSTALL README.install.urpmi
%{_udevrulesdir}/*
%{_bindir}/*
%{_datadir}/em8300
%{_datadir}/alsa/cards/EM8300.conf
%{_mandir}/man1/*

%files devel
%{_includedir}/linux/*

%files -n dkms-%{name}
/usr/src/%{name}-%{version}-%{release}


%changelog

* Wed Jan 16 2013 fwang <fwang> 0.18.0-7.mga3
+ Revision: 388493
- correct udev rules dir

* Fri Jan 11 2013 umeabot <umeabot> 0.18.0-6.mga3
+ Revision: 349595
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Nov 16 2012 fwang <fwang> 0.18.0-5.mga3
+ Revision: 318552
- link with m
- link with x11
- set noarch package

* Thu Sep 15 2011 fwang <fwang> 0.18.0-4.mga2
+ Revision: 143640
- fix linkage

* Fri Jan 14 2011 anssi <anssi> 0.18.0-3.mga2
+ Revision: 17544
- fix license tag
- fix build with 2.6.36+ and 2.6.37+ (2.6.36-1.patch, 2.6.36-2.patch,
  2.6.36-3.patch, 2.6.37-1.patch)
- imported package em8300