3e28b04
%global majorminor 1.0
1a47c5d
%global date 20120405
44610a8
# Avoid to emit gstreamer provides - rhbz#1184975
44610a8
%undefine __gstreamer1_provides
1a47c5d
3e28b04
Summary:       Broadcom Crystal HD device interface library
3e28b04
Name:          libcrystalhd
3e28b04
Version:       3.10.0
cc0fc2a
Release:       32%{?dist}
3e28b04
License:       LGPLv2
d1c0295
URL:           http://www.broadcom.com/support/crystal-hd/
3e28b04
ExcludeArch:   s390 s390x
3e28b04
3e28b04
#Source:       http://www.broadcom.com/docs/support/crystalhd/crystalhd_linux_20100703.zip
caf66ed
# This tarball and README are inside the above zip file...
1a47c5d
# Patch generated from http://git.linuxtv.org/jarod/crystalhd.git
3e28b04
Source0:       libcrystalhd-%{date}.tar.bz2
3e28b04
Source1:       README_07032010
caf66ed
# We're going to use even newer firmware for now
3e28b04
Source2:       bcm70012fw.bin
3e28b04
Source3:       bcm70015fw.bin
caf66ed
# LICENSE file is copy-n-pasted from http://www.broadcom.com/support/crystal_hd/
3e28b04
Source4:       LICENSE
3e28b04
Source5:       libcrystalhd-snapshot.sh
3e28b04
Patch0:        libcrystalhd-nosse2.patch
3e28b04
# https://patchwork2.kernel.org/patch/2247431/
3e28b04
Patch1:        crystalhd-gst-Port-to-GStreamer-1.0-API.patch
3e28b04
333028f
BuildRequires: gcc-c++
3e28b04
BuildRequires: autoconf automake libtool
3e28b04
BuildRequires: gstreamer1-devel >= %{majorminor}
3e28b04
BuildRequires: gstreamer1-plugins-base-devel >= %{majorminor}
244e6fb
BuildRequires: make
3e28b04
Requires:      crystalhd-firmware
dc50404
dc50404
%description
dc50404
The libcrystalhd library provides userspace access to Broadcom Crystal HD
dc50404
video decoder devices. The device supports hardware decoding of MPEG-2,
caf66ed
h.264 and VC1 video codecs, up to 1080p at 40fps for the first-generation
caf66ed
bcm970012 hardware, and up to 1080p at 60fps for the second-generation
caf66ed
bcm970015 hardware.
dc50404
dc50404
%package devel
dc50404
Summary:       Development libs for libcrystalhd
dc50404
Requires:      %{name} = %{version}-%{release}
dc50404
dc50404
%description devel
dc50404
Development libraries needed to build applications against libcrystalhd.
dc50404
dc50404
%package -n crystalhd-firmware
dc50404
Summary:       Firmware for the Broadcom Crystal HD video decoder
dc50404
License:       Redistributable, no modification permitted
dc50404
BuildArch:     noarch
dc50404
Requires:      %{name} = %{version}-%{release}
dc50404
dc50404
%description -n crystalhd-firmware
caf66ed
Firmwares for the Broadcom Crystal HD (bcm970012 and bcm970015)
caf66ed
video decoders.
caf66ed
caf66ed
%package -n gstreamer-plugin-crystalhd
caf66ed
Summary:       Gstreamer crystalhd decoder plugin
caf66ed
Requires:      %{name} = %{version}-%{release}
3e28b04
Requires:      gstreamer1-plugins-base
caf66ed
caf66ed
%description -n gstreamer-plugin-crystalhd
caf66ed
Gstreamer crystalhd decoder plugin
dc50404
dc50404
%prep
1a47c5d
%setup -q -n libcrystalhd-%{date}
caf66ed
cp %{SOURCE1} %{SOURCE4} .
1a47c5d
%ifnarch %{ix86} ia64 x86_64
1a47c5d
%patch0 -p1 -b .nosse2
1a47c5d
sed -i -e 's|-msse2||' linux_lib/libcrystalhd/Makefile
1a47c5d
%endif
3e28b04
%patch1 -p1 -b .gst1
dc50404
dc50404
%build
dc50404
pushd linux_lib/libcrystalhd/ > /dev/null 2>&1
2784f18
sed -i -e 's|-D__LINUX_USER__|-D__LINUX_USER__ %{optflags}|' Makefile
2784f18
%{make_build}
dc50404
popd > /dev/null 2>&1
3e28b04
caf66ed
pushd filters/gst/gst-plugin/ > /dev/null 2>&1
1a47c5d
sh autogen.sh || :
3e28b04
caf66ed
%configure
1a47c5d
make %{?_smp_mflags} \
2784f18
  CFLAGS="%{optflags} -I%{_builddir}/%{buildsubdir}/include -I%{_builddir}/%{buildsubdir}/linux_lib/libcrystalhd" \
2784f18
  BCMDEC_LDFLAGS="%{?__global_ldflags} -L%{_builddir}/%{buildsubdir}/linux_lib/libcrystalhd -lcrystalhd"
caf66ed
popd > /dev/null 2>&1
dc50404
dc50404
%install
dc50404
pushd linux_lib/libcrystalhd/ > /dev/null 2>&1
dc50404
make install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
dc50404
popd > /dev/null 2>&1
3e28b04
caf66ed
pushd filters/gst/gst-plugin/ > /dev/null 2>&1
caf66ed
make install DESTDIR=$RPM_BUILD_ROOT
3e28b04
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstbcmdec.{a,la}
caf66ed
popd > /dev/null 2>&1
3e28b04
1a47c5d
rm -rf $RPM_BUILD_ROOT/lib/firmware/
1a47c5d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/firmware/
3acdff4
install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_prefix}/lib/firmware/
3acdff4
install -pm 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/lib/firmware/
3e28b04
1a47c5d
#Install udev rule
b1065d3
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d
1a47c5d
install -pm 0644 driver/linux/20-crystalhd.rules \
b1065d3
  $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d
dc50404
dc50404
8856e89
%ldconfig_scriptlets
dc50404
dc50404
%files
caf66ed
%doc README_07032010 LICENSE
dc50404
%{_libdir}/libcrystalhd.so.*
dc50404
dc50404
%files devel
dc50404
%dir %{_includedir}/libcrystalhd
dc50404
%{_includedir}/libcrystalhd/*
dc50404
%{_libdir}/libcrystalhd.so
dc50404
dc50404
%files -n crystalhd-firmware
caf66ed
%doc LICENSE
b1065d3
%{_prefix}/lib/udev/rules.d/20-crystalhd.rules
1a47c5d
%{_prefix}/lib/firmware/bcm70012fw.bin
1a47c5d
%{_prefix}/lib/firmware/bcm70015fw.bin
caf66ed
caf66ed
%files -n gstreamer-plugin-crystalhd
caf66ed
%{_libdir}/gstreamer-%{majorminor}/*.so
dc50404
dc50404
dc50404
%changelog
cc0fc2a
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-32
cc0fc2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
cc0fc2a
7e2bc54
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-31
7e2bc54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
7e2bc54
37dd76d
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-30
37dd76d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
37dd76d
4540145
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-29
4540145
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
4540145
3eca1ba
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-28
3eca1ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
3eca1ba
e0cffc2
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-27
e0cffc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
e0cffc2
6395295
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-26
6395295
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
6395295
b6ff1ed
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-25
b6ff1ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b6ff1ed
c9c249b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-24
c9c249b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c9c249b
33a8eba
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-23
33a8eba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
33a8eba
54ad8c6
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-22
54ad8c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
54ad8c6
795513a
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-21
795513a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
795513a
6a35e1b
* Tue Jul 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-20
6a35e1b
- Add missng cc
6a35e1b
532ba87
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-19
532ba87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
532ba87
b858dbd
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-18
b858dbd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b858dbd
eef481f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-17
eef481f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
eef481f
610efe0
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-16
610efe0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
610efe0
330c50e
* Mon Feb 13 2017 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-15
330c50e
- Add cflags/ldflags - rhbz#1411018
330c50e
26740ce
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-14
26740ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
26740ce
3acdff4
* Wed Jul 20 2016 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-13
3acdff4
- Fix perm on firmware files - rhbz#1321530
3acdff4
b10404f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-12
b10404f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b10404f
44610a8
* Mon Aug 03 2015 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-11
44610a8
- Avoid to emit gstreamer1 provides - rhbz#1184975
44610a8
6a2e973
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-10
6a2e973
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6a2e973
f3c6eae
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.10.0-9
f3c6eae
- Rebuilt for GCC 5 C++11 ABI change
f3c6eae
cb33cec
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-8
cb33cec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
cb33cec
9e6d2a3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-7
9e6d2a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9e6d2a3
b1065d3
* Mon Oct 07 2013 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-6
b1065d3
- Don't install udev rules in /etc/udev/rules.d - rhbz#979542
b1065d3
76a19ff
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-5
76a19ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
76a19ff
3e28b04
* Sun Apr 14 2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.10.0-4
3e28b04
- Add patch to port to gstreamer 1.0 and update spec
3e28b04
2769e4a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-3
2769e4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2769e4a
1a47c5d
* Fri Aug 03 2012 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-2
1a47c5d
- Fix build on non-SSE2 arches
1a47c5d
- Install CrystalHD udev rule
1a47c5d
- Clean spec file
1a47c5d
1a47c5d
* Thu Apr 05 2012 Nicolas Chauvet <kwizart@gmail.com> - 3.10.0-1
1a47c5d
- Update to 3.10.0
7012063
d3d178d
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-3
d3d178d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d3d178d
d897422
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-2
d897422
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d897422
Jarod Wilson 1c6589a
* Sat Aug 28 2010 Jarod Wilson <jarod@redhat.com> - 3.5.1-1
Jarod Wilson 1c6589a
- Update to v3.5.1, now with nv12 support
Jarod Wilson 1c6589a
01a4cde
* Sun Jul 25 2010 Jarod Wilson <jarod@redhat.com> - 3.5.0-2
01a4cde
- Tarball had object files in it, clean them out before building
01a4cde
caf66ed
* Sat Jul 24 2010 Jarod Wilson <jarod@redhat.com> - 3.5.0-1
caf66ed
- Rebase to 07032010 crystalhd sources
caf66ed
- Large version-bump as driver and lib are now essentially 100%
caf66ed
  in sync with the Windows driver and lib
caf66ed
- Ship firmware, now that Broadcom has posted a redistribution,
caf66ed
  no modification license to cover it
caf66ed
- Build the gstreamer decoder plugin (will be moved to its own
caf66ed
  package sooner or later)
caf66ed
033f29f
* Sun Apr 04 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-4
033f29f
- Fix segfault on firmware upload
033f29f
2be0e56
* Fri Mar 26 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-3
2be0e56
- Update to pre-0.9.26 libcrystalhd, which contains support
2be0e56
  for the new Broadcom BCM970015 Crystal HD decoder card
2be0e56
dc50404
* Thu Mar 11 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-2
dc50404
- Minor fixups to the as-yet-not-enabled firmware sub-package
dc50404
dc50404
* Wed Jan 06 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-1
dc50404
- Initial package