recfriio-vl.spec 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. %define hg_src a910b49dfbee
  2. %define b25_hg_src ec7c87854f2f
  3. Summary: Digital terrestrial television recording tool for linux
  4. Summary(ja): 地上波デジタルテレビ放送の Linux 用録画ツール
  5. Name: recfriio
  6. Version: r5
  7. Release: 1%{?_dist_release}
  8. # #recfriio r4 + arib25 0.2.1
  9. # Source0: http://2sen.dip.jp/cgi-bin/friioup/source/up0777.zip
  10. #recfriio r5 + arib25 0.2.5
  11. Source0: http://2sen.dip.jp/cgi-bin/friioup/source/up1210.zip
  12. #recfriio r4 for HDUS
  13. Source1: http://2sen.dip.jp/cgi-bin/hdusup/source/up0127.zip
  14. Source2: http://2sen.dip.jp/cgi-bin/hdusup/source/up0257.zip
  15. # Download URL: http://hg.honeyplanet.jp/pt1/archive/%{hg_src}.tar.bz2
  16. Source3: pt1-%{hg_src}.tar.bz2
  17. Source4: pt1-%{b25_hg_src}.tar.bz2
  18. Patch0: recfriior5-fix-compile-vine.patch
  19. Patch1: b25-0.2.4-Makefile.patch
  20. Patch2: recfriior5-fix-recfriior4-newhdus-patch.patch
  21. License: distributable/BSD (see README files for detail)
  22. Group: Applications/Multimedia
  23. #URL:
  24. #Requires:
  25. BuildRequires: libboost-devel, libboost-thread, libboost-filesystem
  26. BuildRequires: pcsc-lite-devel
  27. BuildRequires: unzip
  28. BuildRequires: glib2-devel, libusb-devel
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  30. Packager: kazutaka
  31. %description
  32. Set of command line tools to record digital terrestrial television
  33. for linux.
  34. It supports friio (digital terrestrial television and BS/CS) and
  35. MonsterTV HDUS series (*Not suppot all models).
  36. For HDUS uses, you should copy the firmware(SKNET_AS11Loader.sys)
  37. to %{_libdir}/hdus and then udev automatically load it when device
  38. is found.
  39. %description -l ja
  40. 地上波デジタルテレビ放送を録画する為の、Linux 用のコマンドライン
  41. ツールです。
  42. friio (地上波デジタル用及びBS/CS用)と MonsterTV HDUS シリーズ
  43. (*一部の対応機種のみ)に対応しています。
  44. 尚、HDUS で利用する場合はファームウェア(SKNET_AS11Loader.sys)
  45. を %{_libdir}/hdus に置いておくと、udev 経由で自動的に読み込まれ
  46. ます。
  47. #------------------------------------------------------------------------------
  48. %package -n b25
  49. Summary: Digital terrestrial television stream decryption tool
  50. Summary(ja): 地上波デジタルテレビ放送の複合用ツール
  51. License: distributable
  52. Group: Applications/Multimedia
  53. URL: http://hg.honeyplanet.jp/pt1
  54. Conflicts: recfriio <= r4-2%{?_dist_release}
  55. %description -n b25
  56. b25 is a command line tool for linux to decrypt MPEG2-TS stream
  57. recorded by digital terrestrial television recorder, such as
  58. friio, pt1 and HDUS.
  59. %description -n b25 -l ja
  60. friio や pt1、HDUS 等の、PC 用の地上波デジタルテレビ放送の
  61. 受信機で録画した、暗号化されているMPEG2-TS ストリームを復号化
  62. する為の、Linux 用のコマンドラインツールです。
  63. #------------------------------------------------------------------------------
  64. %package -n b25-devel
  65. Summary: Development file for b25
  66. Summary(ja): b25 用の開発ファイル
  67. Group: Development/Libraries
  68. Requires: b25 = %{version}-%{release}
  69. %description -n b25-devel
  70. This package contains the libraries and header files for b25.
  71. %description -n b25-devel -l ja
  72. このパッケージには b25 を操作するためのライブラリとヘッダが
  73. 含まれています。
  74. #------------------------------------------------------------------------------
  75. %prep
  76. [ -n "%{_builddir}/%{name}%{version}" -a "%{_builddir}/%{name}%{version}" != / ] && %__rm -rf %{_builddir}/%{name}%{version}
  77. %setup -q -n %{name}%{version} -a 1 -a 2 -a 3 -a 4
  78. %patch2 -p1 -b .recfriior5
  79. pushd recfriior5
  80. patch -p1 < ../hdus-recfriior4/recfriior4.diff || exit 1
  81. patch -p1 < ../recfriio-newpatch/recfriior4-newhdus.patch || exit 1
  82. # apply patch to fix recfriio compilation error on Vine Linux
  83. %patch0 -p2
  84. popd
  85. pushd pt1-%{b25_hg_src}
  86. %patch1 -p1 -b .
  87. popd
  88. # remove old b25 directory and create sym link to point newer one
  89. %{__rm} -rf arib25v025/arib25
  90. pushd arib25v025
  91. %{__ln_s} ../pt1-%{b25_hg_src}/arib25 arib25 || exit 1
  92. popd
  93. %build
  94. pushd pt1-%{b25_hg_src}/arib25
  95. %{__make}
  96. popd
  97. pushd recfriior5
  98. %{__make}
  99. popd
  100. pushd hdus-recfriior4/as11loader/
  101. %{__make}
  102. popd
  103. %install
  104. %{__rm} -rf ${RPM_BUILD_ROOT}
  105. %{__install} -D -m 755 recfriior5/%{name} ${RPM_BUILD_ROOT}/%{_bindir}/%{name}
  106. %{__install} -D -m 755 hdus-recfriior4/as11loader/as11loader ${RPM_BUILD_ROOT}/%{_libdir}/hdus/as11loader
  107. # install b25 and libarib25.so
  108. pushd pt1-%{b25_hg_src}/arib25
  109. %{__make} install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
  110. popd
  111. # setup udev rule for permission and hdus firmware
  112. %{__install} -d ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/rules.d/
  113. %{__cat} << EOF > ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/rules.d/99-recfriio.rules
  114. # set permission and group: friio
  115. SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
  116. ATTRS{idVendor}=="7a69", ATTRS{idProduct}=="0001", \
  117. MODE="0664", GROUP="video"
  118. # set permission and group: HDUS
  119. SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
  120. ATTRS{idVendor}=="3275", ATTRS{idProduct}=="6051", \
  121. MODE="0664", GROUP="video"
  122. # load the firmware of HDUS
  123. SUBSYSTEM=="usb", ACTION=="add", \
  124. ATTRS{idVendor}=="1738", ATTRS{idProduct}=="5211", \
  125. RUN+="/bin/sh -c 'cd %{_libdir}/hdus; ./as11loader'"
  126. EOF
  127. # add documents
  128. %{__install} -d ${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version}
  129. %{__cp} -p recfriior5/readme.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version}/README_up1210.zip.recfriior5 || exit 1
  130. %{__cp} -p recfriior5/91-permissions.rules ${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version}/ || exit 1
  131. %{__cp} -p hdus-recfriior4/README.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version}/README_up0127.zip.hdus-recfriior4 || exit 1
  132. %{__cp} -p recfriio-newpatch/README.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version}/README_up0257.zip.recfriio-newpatch || exit 1
  133. %{__install} -d ${RPM_BUILD_ROOT}/%{_defaultdocdir}/b25
  134. %{__cp} -p pt1-%{b25_hg_src}/arib25/readme.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/b25/README.b25 || exit 1
  135. %{__cp} -p pt1-%{b25_hg_src}/b25_docs/readme.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/b25/README.b25-for-linux || exit 1
  136. %{__cp} -p pt1-%{b25_hg_src}/b25_docs/libccid_Info.plist ${RPM_BUILD_ROOT}/%{_defaultdocdir}/b25 || exit 1
  137. %{__cp} -p pt1-%{b25_hg_src}/b25_docs/smartcard_list.txt ${RPM_BUILD_ROOT}/%{_defaultdocdir}/b25 || exit 1
  138. %clean
  139. %{__rm} -rf ${RPM_BUILD_ROOT}
  140. %files
  141. %defattr(-,root,root)
  142. %doc %{_defaultdocdir}/%{name}-%{version}
  143. %{_bindir}/%{name}
  144. %{_libdir}/hdus/as11loader
  145. %{_sysconfdir}/udev/rules.d/99-recfriio.rules
  146. %files -n b25
  147. %defattr(-,root,root)
  148. %doc %{_defaultdocdir}/b25
  149. %{_bindir}/b25
  150. %{_libdir}/libarib25.so.*
  151. %files -n b25-devel
  152. %defattr(-,root,root)
  153. %{_includedir}/arib25/*.h
  154. %{_libdir}/libarib25.so
  155. %changelog
  156. * Tue Feb 21 2012 Munehiro Yamamoto <munepi@vinelinux.org> r5-1
  157. - updated to r5
  158. - updated arib25 to 0.2.5
  159. - added some comments
  160. - added Source4: pt1-ec7c87854f2f.tar.bz2
  161. - updated Patch0: recfriior4-fix-compile.patch
  162. as recfriior5-fix-compile-vine.patch
  163. * Sat Jan 09 2010 Kazutaka HARADA <kazutaka@vinelinux.org> r4-4
  164. - modify b25-0.2.4-Makefile.patch for x86_64
  165. * Wed Dec 30 2009 Kazutaka HARADA <kazutaka@vinelinux.org> r4-3
  166. - add Source3 for updated/modified b25 sources from pt1 project
  167. - add Patch1 to build rpm packages for newer b25
  168. - add b25, b25-devel subpackage whth libarib25.so* libraries
  169. * Wed Dec 23 2009 Kazutaka HARADA <kazutaka@vinelinux.org> r4-2
  170. - add BuildRequires: glib2-devel, libusb-devel
  171. * Thu Nov 05 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> r4-1
  172. - initial build for Vine Linux