cpu-g-vl.spec 2.7 KB

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