spicctrl-vl.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. %define name spicctrl
  2. %define version 1.8
  3. %define release 1%{?_dist_release}
  4. Summary: Sony Vaio SPIC Control Program
  5. Summary(ja): Sony Vaio ノート用ユーティリティ
  6. Name: %{name}
  7. Version: %{version}
  8. Release: %{release}
  9. Source0: http://popies.net/sonypi/%{name}-%{version}.tar.bz2
  10. License: GPL
  11. Group: Applications/System
  12. URL: http://popies.net/sonypi/
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. %description
  15. This utility allows one to query and set a variety of parameters on your
  16. Sony Vaio laptop computer, including:
  17. * AC Power status
  18. * Battery status
  19. * Screen brightness
  20. * Bluetooth device power status
  21. %description -l ja
  22. このユーティリティにより Sony Vaio ノートの以下の情報を取得/設定
  23. することができます。
  24. * AC電源の状態
  25. * バッテリーの状態
  26. * 画面の輝度
  27. * ブルートゥースデバイスの状態
  28. %prep
  29. %setup
  30. %build
  31. %__make
  32. %install
  33. %__rm -rf ${RPM_BUILD_ROOT}
  34. %__install -d ${RPM_BUILD_ROOT}/%{_sbindir}
  35. %__install -m755 %{_builddir}/%{name}-%{version}/spicctrl ${RPM_BUILD_ROOT}/%{_sbindir}
  36. %__install -d ${RPM_BUILD_ROOT}/%{_mandir}/man1
  37. %__install -m644 %{_builddir}/%{name}-%{version}/spicctrl.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/
  38. %clean
  39. %__rm -rf ${RPM_BUILD_ROOT}
  40. %post
  41. if [ ! -c /dev/sonypi ]; then
  42. rm -f /dev/sonypi
  43. mknod /dev/sonypi c 10 250
  44. fi
  45. if [ -e /etc/modules.conf ]; then
  46. grep 'alias char-major-10-250 sonypi' /etc/modules.conf > /dev/null
  47. RETVAL=$?
  48. if [ $RETVAL -ne 0 ]; then
  49. echo 'alias char-major-10-250 sonypi' >> /etc/modules.conf
  50. echo 'options sonypi minor=250' >> /etc/modules.conf
  51. fi
  52. fi
  53. if [ -e /etc/modprobe.conf ]; then
  54. grep 'alias char-major-10-250 sonypi' /etc/modprobe.conf > /dev/null
  55. RETVAL=$?
  56. if [ $RETVAL -ne 0 ]; then
  57. echo 'alias char-major-10-250 sonypi' >> /etc/modprobe.conf
  58. echo 'options sonypi minor=250' >> /etc/modprobe.conf
  59. fi
  60. fi
  61. if [ -e /etc/security/console.perms ]; then
  62. if ! grep -q '<sonypi>=/dev/sonypi' /etc/security/console.perms; then
  63. echo -e '\n# following 2 lines are added by spicctrl package.' >> /etc/security/console.perms
  64. echo '<sonypi>=/dev/sonypi' >> /etc/security/console.perms
  65. echo '<console> 0600 <sonypi> 0600 root' >> /etc/security/console.perms
  66. fi
  67. fi
  68. %files
  69. %defattr(-,root,root)
  70. %doc AUTHORS LICENSE CHANGES
  71. %{_sbindir}/spicctrl
  72. %{_mandir}/man1/spicctrl.1*
  73. %changelog
  74. * Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.8-1vl5
  75. - applied new versioning policy, spec in utf-8
  76. * Sun Apr 17 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl3
  77. - allow console user to access sonypi device.(by console.perms)
  78. * Sun Apr 03 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl0
  79. - build for Vine Plus.
  80. * Wed Mar 30 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl1
  81. - initial build for VineSeed Plus.