recfriio-vl.spec 6.5 KB

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