libcrystalhd-vl.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. %global majorminor 1.0
  2. %global date 20120405
  3. Name: libcrystalhd
  4. Version: 3.10.0
  5. Release: 2%{?_dist_release}
  6. Summary: Broadcom Crystal HD device interface library
  7. Summary(ja): Broadcom Crystal HD デバイスのインターフェースライブラリ
  8. License: LGPLv2
  9. Group: System Environment/Libraries
  10. URL: http://www.broadcom.com/support/crystal_hd/
  11. #Source: http://www.broadcom.com/docs/support/crystalhd/crystalhd_linux_20100703.zip
  12. # This tarball and README are inside the above zip file...
  13. # Patch generated from http://git.linuxtv.org/jarod/crystalhd.git
  14. Source0: libcrystalhd-%{date}.tar.bz2
  15. Source1: README_07032010
  16. # We're going to use even newer firmware for now
  17. Source2: bcm70012fw.bin
  18. Source3: bcm70015fw.bin
  19. # LICENSE file is copy-n-pasted from http://www.broadcom.com/support/crystal_hd/
  20. Source4: LICENSE
  21. Source5: libcrystalhd-snapshot.sh
  22. Patch0: libcrystalhd-nosse2.patch
  23. # https://patchwork2.kernel.org/patch/2247431/
  24. Patch1: crystalhd-gst-Port-to-GStreamer-1.0-API.patch
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  26. BuildRequires: autoconf automake libtool
  27. BuildRequires: gstreamer1-devel >= %{majorminor}
  28. BuildRequires: gstreamer1-plugins-base-devel >= %{majorminor}
  29. Requires: crystalhd-firmware
  30. %description
  31. The libcrystalhd library provides userspace access to Broadcom Crystal HD
  32. video decoder devices. The device supports hardware decoding of MPEG-2,
  33. h.264 and VC1 video codecs, up to 1080p at 40fps for the first-generation
  34. bcm970012 hardware, and up to 1080p at 60fps for the second-generation
  35. bcm970015 hardware.
  36. %package devel
  37. Summary: Development libs for libcrystalhd
  38. Summary(ja): libcrystalhd の開発用ファイル
  39. Group: Development/Libraries
  40. Requires: %{name} = %{version}-%{release}
  41. %description devel
  42. Development libraries needed to build applications against libcrystalhd.
  43. %package -n crystalhd-firmware
  44. Summary: Firmware for the Broadcom Crystal HD video decoder
  45. Summary(ja): Broadcom Crystal HD ビデオデコーダ用ファームウェア
  46. License: Redistributable, no modification permitted
  47. Group: System Environment/Kernel
  48. BuildArch: noarch
  49. Requires: %{name} = %{version}-%{release}
  50. %description -n crystalhd-firmware
  51. Firmwares for the Broadcom Crystal HD (bcm970012 and bcm970015)
  52. video decoders.
  53. %package -n gstreamer-plugin-crystalhd
  54. Summary: Gstreamer crystalhd decoder plugin
  55. Summary(ja): Gstreamer crystalhd デコーダプラグイン
  56. Group: System Environment/Libraries
  57. Requires: %{name} = %{version}-%{release}
  58. Requires: gstreamer1-plugins-base
  59. %description -n gstreamer-plugin-crystalhd
  60. Gstreamer crystalhd decoder plugin
  61. %prep
  62. %setup -q -n libcrystalhd-%{date}
  63. cp %{SOURCE1} %{SOURCE4} .
  64. %ifnarch %{ix86} ia64 x86_64
  65. %patch0 -p1 -b .nosse2
  66. sed -i -e 's|-msse2||' linux_lib/libcrystalhd/Makefile
  67. %endif
  68. %patch1 -p1 -b .gst1
  69. %build
  70. pushd linux_lib/libcrystalhd/ > /dev/null 2>&1
  71. # FIXME: this doesn't work just yet...
  72. #make CPPFLAGS="%{optflags}" %{?_smp_mflags}
  73. make %{?_smp_mflags}
  74. popd > /dev/null 2>&1
  75. pushd filters/gst/gst-plugin/ > /dev/null 2>&1
  76. sh autogen.sh || :
  77. %configure
  78. make %{?_smp_mflags} \
  79. CFLAGS="-I%{_builddir}/%{buildsubdir}/include -I%{_builddir}/%{buildsubdir}/linux_lib/libcrystalhd" \
  80. BCMDEC_LDFLAGS="-L%{_builddir}/%{buildsubdir}/linux_lib/libcrystalhd -lcrystalhd"
  81. popd > /dev/null 2>&1
  82. %install
  83. rm -rf $RPM_BUILD_ROOT
  84. pushd linux_lib/libcrystalhd/ > /dev/null 2>&1
  85. make install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
  86. popd > /dev/null 2>&1
  87. pushd filters/gst/gst-plugin/ > /dev/null 2>&1
  88. make install DESTDIR=$RPM_BUILD_ROOT
  89. rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstbcmdec.{a,la}
  90. popd > /dev/null 2>&1
  91. #rm -rf $RPM_BUILD_ROOT/lib/firmware/
  92. mkdir -p $RPM_BUILD_ROOT/lib/firmware/
  93. cp -p %{SOURCE2} $RPM_BUILD_ROOT/lib/firmware/
  94. cp -p %{SOURCE3} $RPM_BUILD_ROOT/lib/firmware/
  95. # Install udev rule
  96. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  97. install -pm 0644 driver/linux/20-crystalhd.rules \
  98. $RPM_BUILD_ROOT/lib/udev/rules.d
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT
  101. %post -p /sbin/ldconfig
  102. %postun -p /sbin/ldconfig
  103. %files
  104. %defattr(-,root,root,0755)
  105. %doc README_07032010 LICENSE
  106. %{_libdir}/libcrystalhd.so.*
  107. %files devel
  108. %defattr(-,root,root,0755)
  109. %dir %{_includedir}/libcrystalhd
  110. %{_includedir}/libcrystalhd/*
  111. %{_libdir}/libcrystalhd.so
  112. %files -n crystalhd-firmware
  113. %defattr(-,root,root,0755)
  114. %doc LICENSE
  115. /lib/udev/rules.d/20-crystalhd.rules
  116. /lib/firmware/bcm70012fw.bin
  117. /lib/firmware/bcm70015fw.bin
  118. %files -n gstreamer-plugin-crystalhd
  119. %defattr(-,root,root,0755)
  120. %{_libdir}/gstreamer-%{majorminor}/*.so
  121. %changelog
  122. * Sun Jul 10 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.0-2
  123. - rebuild with gcc-5.4.0
  124. * Tue Mar 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.10.0-1
  125. - updated to 3.10.0 based on Fedora 3.10.0-8
  126. - changed gstreamer-plugin-crystalhd to System Environment/Libraries Group
  127. * Wed Jan 11 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.1-3
  128. - applied libcrystalhd-3.5.1-define-first.patch
  129. * Sun May 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.1-2
  130. - add Patch1 for ppc (libcrystalhd-ppc.patch)
  131. * Sun Feb 20 2011 Munehiro Yamamoto <munepi@vinelinux.org> - 3.5.1-1
  132. - initial build based on Fedora rawhide
  133. * Sat Aug 28 2010 Jarod Wilson <jarod@redhat.com> - 3.5.1-1
  134. - Update to v3.5.1, now with nv12 support
  135. * Sun Jul 25 2010 Jarod Wilson <jarod@redhat.com> - 3.5.0-2
  136. - Tarball had object files in it, clean them out before building
  137. * Sat Jul 24 2010 Jarod Wilson <jarod@redhat.com> - 3.5.0-1
  138. - Rebase to 07032010 crystalhd sources
  139. - Large version-bump as driver and lib are now essentially 100%
  140. in sync with the Windows driver and lib
  141. - Ship firmware, now that Broadcom has posted a redistribution,
  142. no modification license to cover it
  143. - Build the gstreamer decoder plugin (will be moved to its own
  144. package sooner or later)
  145. * Sun Apr 04 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-4
  146. - Fix segfault on firmware upload
  147. * Fri Mar 26 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-3
  148. - Update to pre-0.9.26 libcrystalhd, which contains support
  149. for the new Broadcom BCM970015 Crystal HD decoder card
  150. * Thu Mar 11 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-2
  151. - Minor fixups to the as-yet-not-enabled firmware sub-package
  152. * Wed Jan 06 2010 Jarod Wilson <jarod@redhat.com> - 0.9.25-1
  153. - Initial package