cpu-g-vl.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. Name: cpu-g
  2. Version: 0.9.0
  3. Release: 1%{?_dist_release}
  4. Summary: shows useful information about your hardware
  5. Summary(ja): お使いのハードウェアに関する有用な情報を表示します
  6. Group: Applications/System
  7. License: GPLv3
  8. URL: http://sourceforge.net/projects/cpug/
  9. Source0: %{name}-%{version}.tar.gz
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  11. Requires: pygtk2 >= 2.10.0
  12. Requires: pygtk2-libglade
  13. Requires: gtk2 >= 2.10.0
  14. %description
  15. CPU-G is an application that shows useful information
  16. about your hardware. It collects and displays information
  17. about your CPU, RAM, Motherboard, some general information
  18. about your system and more.
  19. %description -l ja
  20. CPU-Gは、お使いのハードウェアに関する有用な情報を表示するアプリケーションです。
  21. CPU・RAM・マザーボード、ほかいくつかの一般的情報を収集し、表示します。
  22. %prep
  23. %setup -q -n %{name}-%{version}
  24. # change CPU/Vendor images path
  25. sed -i 's|data/logos/|/usr/share/cpu-g/logos/|g' %{name}
  26. # change cpu-g.glade path
  27. sed -i 's|self.gladefile = "cpu-g.glade"|self.gladefile = "/usr/share/cpu-g/cpu-g.glade"|g' \
  28. %{name}
  29. # change application icon path
  30. sed -i 's|data/cpu-g.png|/usr/share/pixmaps/cpu-g.png|g' %{name}.glade
  31. # change application icon path
  32. sed -i 's|data/cpu-g.png|/usr/share/pixmaps/cpu-g.png|g' data/%{name}.desktop
  33. %build
  34. %install
  35. rm -rf $RPM_BUILD_ROOT
  36. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  37. install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
  38. mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
  39. install -m 644 %{name}.glade $RPM_BUILD_ROOT%{_datadir}/%{name}/
  40. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
  41. install -m 644 data/%{name}.desktop $RPM_BUILD_ROOT%{_datadir}/applications/
  42. mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
  43. install -m 644 data/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/
  44. mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/logos/
  45. install -m 644 data/logos/*.png $RPM_BUILD_ROOT%{_datadir}/%{name}/logos/
  46. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
  47. install -m 644 doc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
  48. %clean
  49. rm -rf $RPM_BUILD_ROOT
  50. %post
  51. touch --no-create %{_datadir}/icons/hicolor || :
  52. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  53. update-desktop-database > /dev/null 2>&1 || :
  54. %postun
  55. touch --no-create %{_datadir}/icons/hicolor || :
  56. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  57. update-desktop-database > /dev/null 2>&1 || :
  58. %files
  59. %defattr(-,root,root,-)
  60. %doc COPYING README
  61. %{_bindir}/%{name}
  62. %{_datadir}/applications/%{name}.desktop
  63. %{_datadir}/%{name}/%{name}.glade
  64. %{_datadir}/pixmaps/*
  65. %{_datadir}/%{name}/logos/*
  66. %{_mandir}/man1/*
  67. %changelog
  68. * Sat Jan 30 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.9.0-1
  69. - initial build for VineLinux