tpb-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Name: tpb
  2. Version: 0.6.4
  3. Release: 2%{?_dist_release}
  4. Summary: IBM ThinkPad button support utility
  5. Summary(ja): IBM ThinkPad ボタンサポートユーティリティ
  6. Group: System Environment/Base
  7. License: GPL
  8. URL: http://www.nongnu.org/tpb/
  9. Source0: http://savannah.nongnu.org/download/tpb/tpb-%{version}.tar.gz
  10. Source1: http://savannah.nongnu.org/download/tpb/tpb-%{version}.tar.gz.sig
  11. Patch0: %{name}-defaultconfig.patch
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. BuildRequires: libxosd-devel >= 2.0.0
  14. BuildRequires: xorg-x11-devel
  15. BuildRequires: gettext
  16. BuildRequires: libXt-devel
  17. Requires: xorg-x11-xinit
  18. Requires: udev
  19. Requires: MAKEDEV
  20. %description
  21. With TPB it is possible to bind a program to the ThinkPad, Mail, Home
  22. and Search buttons. TPB can also run a callback program on each state
  23. change with the changed state and the new state as options. So it is
  24. possible to trigger several actions on different events. TPB has a
  25. on-screen display (OSD) to show volume, mute, brightness and some
  26. other information. Furthermore TPB supports a software mixer, as the
  27. R series ThinkPads have no hardware mixer to change the volume.
  28. %prep
  29. %setup -q
  30. %patch0 -p0
  31. # Start tpb at X startup:
  32. cat <<EOF > %{name}.xinit
  33. #!/bin/sh
  34. %{_bindir}/tpb -d
  35. EOF
  36. # For the initial MAKEDEV at post-install time, and possibly later:
  37. cat <<EOF > %{name}.makedev
  38. # Custom permissions for nvram for use with tpb(1).
  39. c 664 root root 10 144 1 1 nvram
  40. EOF
  41. # Permissions fixup:
  42. cat <<EOF > %{name}.rules
  43. # Custom permissions for nvram for use with tpb(1).
  44. KERNEL=="nvram", MODE="0664"
  45. EOF
  46. %build
  47. %configure
  48. make %{?_smp_mflags}
  49. %install
  50. rm -rf $RPM_BUILD_ROOT
  51. make install DESTDIR=$RPM_BUILD_ROOT
  52. install -Dm 755 %{name}.xinit \
  53. $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/%{name}.sh
  54. install -Dpm 644 %{name}.rules \
  55. $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/90-%{name}.rules
  56. install -Dpm 644 %{name}.makedev \
  57. $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d/zz_%{name}
  58. %find_lang %{name}
  59. %clean
  60. rm -rf $RPM_BUILD_ROOT
  61. %files -f %{name}.lang
  62. %defattr(-,root,root,-)
  63. %doc ChangeLog COPYING CREDITS README doc/callback_example.sh doc/nvram.txt
  64. %config %{_sysconfdir}/X11/xinit/xinitrc.d/%{name}.sh
  65. %config(noreplace) %{_sysconfdir}/tpbrc
  66. %config(noreplace) %{_sysconfdir}/udev/rules.d/*-%{name}.rules
  67. %config(noreplace) %{_sysconfdir}/makedev.d/*%{name}
  68. %{_bindir}/tpb
  69. %{_mandir}/man1/tpb.1*
  70. # Note: need read access here.
  71. #%attr(644,root,root) %dev(c,10,144) /dev/nvram
  72. %changelog
  73. * Wed Sep 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.6.4-2
  74. - added nvram rules
  75. - added Requires: udev, MAKEDEV
  76. * Fri Jul 17 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.6.4-1vl5
  77. - new upstream release
  78. - changed XOrg-devel to xorg-x11-devel
  79. - added BuildRequires: libXt-devel, Requires: xorg-x11-xinit
  80. * Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 0.6.3-3vl5
  81. - applied new versioning policy, spec in utf-8
  82. * Sat Sep 11 2004 Kunio Murasawa <murasawa@fa2.so-net.ne.jp> 0.6.3-2vl1
  83. - based on Fedora
  84. - new upstream release
  85. - fixed BuildRoot, BuildRequires
  86. - delete Epoch
  87. - added summary(ja)
  88. * Wed Jun 2 2004 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.2-0.fdr.2
  89. - Rename xinit scriptlet to tpb.sh (bug 1227, bugzilla.redhat.com/122869).
  90. * Wed May 19 2004 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.2-0.fdr.1
  91. - Update to 0.6.2.
  92. - Improve default configuration.
  93. - Remove LD_ASSUME_KERNEL hack.
  94. * Mon Jan 19 2004 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.1-0.fdr.1
  95. - Update to 0.6.1.
  96. * Mon Nov 24 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.0-0.fdr.3
  97. - Don't use MAKEDEV to create /dev/nvram.
  98. * Wed Oct 22 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.0-0.fdr.2
  99. - Add LD_ASSUME_KERNEL=2.4.1 workaround to xinit script.
  100. http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=3260&group_id=2320
  101. * Mon Aug 11 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.6.0-0.fdr.1
  102. - Update to 0.6.0.
  103. * Tue May 27 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.5.1-0.fdr.4
  104. - Make /dev/nvram readable again (#296).
  105. * Sun May 18 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.5.1-0.fdr.3
  106. - Use MAKEDEV for creating the nvram device node and own it.
  107. - Mark xinit file as config to make rpmlint happy.
  108. - %%{buildroot} -> $RPM_BUILD_ROOT.
  109. - Make the build honor $RPM_OPT_FLAGS.
  110. * Sat Apr 19 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.5.1-0.fdr.2
  111. - Don't require tpctl (#177).
  112. * Fri Apr 11 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.5.1-0.fdr.1
  113. - Update to 0.5.1.
  114. * Sun Apr 6 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.5.0-0.fdr.1
  115. - Update to 0.5.0.
  116. - Save .spec in UTF-8.
  117. * Sun Mar 30 2003 Ville Skytta <ville.skytta at iki.fi> - 0:0.4.2-0.fdr.1
  118. - Rebuild according to Fedora RC3 guidelines.
  119. * Sat Feb 8 2003 Ville Skytta <ville.skytta at iki.fi> - 0.4.2-1.fedora.1
  120. - First Fedora release.