]>
Commit | Line | Data |
---|---|---|
78254722 JB |
1 | # TODO: ATI ADL on bcond? |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without appindicator # application indicators support | |
5 | %bcond_with unity # Unity support | |
6 | %bcond_without nvidia # NVidia GPU support (using libXNVCtrl) | |
7 | %bcond_with ati # ATI GPU support (using libatiadl) | |
8 | ||
7f2e242d | 9 | Summary: A Graphical Temperature Monitor |
78254722 | 10 | Summary(pl.UTF-8): Graficzny monitor temperatury |
7f2e242d | 11 | Name: psensor |
78254722 | 12 | Version: 1.2.0 |
0789daab | 13 | Release: 4 |
7f2e242d ER |
14 | License: GPL v2 |
15 | Group: X11/Applications | |
00e0389d | 16 | Source0: http://wpitchoune.net/psensor/files/%{name}-%{version}.tar.gz |
78254722 JB |
17 | # Source0-md5: 0d8ac0a1312e96f2101ecc7c684e2863 |
18 | Patch0: %{name}-json.patch | |
19 | Patch1: %{name}-sh.patch | |
20 | URL: http://wpitchoune.net/psensor/ | |
21 | #%{?with_ati:BuildRequires: libatiadlxx, adl_defines.h} | |
22 | BuildRequires: asciidoc | |
23 | BuildRequires: autoconf >= 2.69 | |
24 | BuildRequires: automake | |
7293454e | 25 | BuildRequires: curl-devel |
78254722 JB |
26 | BuildRequires: gettext-tools >= 0.16 |
27 | BuildRequires: glib2-devel >= 1:2.26 | |
28 | BuildRequires: gtk+3-devel >= 3.4 | |
29 | BuildRequires: help2man | |
30 | BuildRequires: json-c-devel >= 0.12 | |
31 | %{?with_nvidia:BuildRequires: libXNVCtrl-devel} | |
32 | %if %{with appindicator} | |
33 | BuildRequires: libappindicator-gtk3-devel | |
34 | %else | |
35 | BuildConflicts: libappindicator-gtk3-devel | |
36 | %endif | |
37 | BuildRequires: libatasmart-devel | |
38 | BuildRequires: libgtop-devel >= 2.0 | |
7293454e ER |
39 | BuildRequires: libmicrohttpd-devel |
40 | BuildRequires: libnotify-devel | |
78254722 JB |
41 | %if %{with unity} |
42 | BuildRequires: libunity-devel >= 3.4.2 | |
43 | %else | |
44 | BuildConflicts: libunity-devel | |
45 | %endif | |
7f2e242d | 46 | BuildRequires: lm_sensors-devel |
7293454e | 47 | BuildRequires: pkgconfig |
78254722 JB |
48 | BuildRequires: udisks2-devel |
49 | BuildRequires: xorg-lib-libX11-devel | |
50 | BuildRequires: xorg-lib-libXext-devel | |
51 | Requires(post,postun): desktop-file-utils | |
52 | Requires(post,postun): gtk-update-icon-cache | |
53 | Requires: glib2 >= 1:2.26 | |
54 | Requires: gtk+3 >= 3.4 | |
55 | Requires: json-c >= 0.12 | |
7f2e242d | 56 | Requires: hddtemp |
00e0389d | 57 | Requires: hicolor-icon-theme |
78254722 | 58 | %{?with_unity:BuildRequires: libunity >= 3.4.2} |
7f2e242d | 59 | Requires: lm_sensors |
7f2e242d ER |
60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
62 | %description | |
63 | Psensor is a graphical hardware temperature monitor for Linux. | |
64 | ||
78254722 JB |
65 | It draws realtime charts and raises alerts about: |
66 | - the temperature of the motherboard and CPU sensors (using | |
67 | lm-sensors). | |
68 | - the temperature of the NVidia GPUs (using XNVCtrl) | |
69 | %if %{with ati} | |
70 | - the temperature of ATI GPUs (using ATI ADL SDK) | |
71 | %endif | |
72 | - the temperature of the Hard Disk Drives (using hddtemp, libatasmart | |
73 | or udisks2) | |
74 | - the rotation speed of the fans | |
75 | - the temperature of a remote computer | |
76 | - the CPU load | |
77 | ||
78 | Alerts are using Desktop Notification and a specific GTK+ status icon. | |
79 | ||
80 | %description -l pl.UTF-8 | |
81 | Psensor to graficzny monitor temperatury sprzętu dla Linuksa. | |
82 | ||
83 | Rysuje w czasie rzeczywistym wykresy i zgłasza alarmy dotyczące: | |
84 | - temperatury płyty głównej i czujników procesora (przy użyciu | |
85 | lm-sensors) | |
86 | - temperatury GPU firmy NVidia (przy użyciu XNVCtrl) | |
87 | %if %{with ati} | |
88 | - temperatury GPU formy ATI (przy użyciu ATI ADL SDK) | |
89 | %endif | |
90 | - temperatury dysków twardych (przy użyciu hddtemp, libatasmart lub | |
91 | udisks2) | |
92 | - prędkości obrotowej wentylatorów | |
93 | - temperatury komputerów zdalnych | |
94 | - obciążenia procesora | |
7f2e242d ER |
95 | |
96 | %prep | |
97 | %setup -q | |
ba6485c5 JR |
98 | %patch0 -p1 |
99 | %patch1 -p1 | |
7f2e242d ER |
100 | |
101 | %build | |
ba6485c5 | 102 | %{__libtoolize} |
78254722 | 103 | %{__aclocal} -I m4 |
ba6485c5 JR |
104 | %{__autoconf} |
105 | %{__autoheader} | |
106 | %{__automake} | |
78254722 JB |
107 | # disable cppcheck: it's developer tool |
108 | %configure \ | |
109 | %{!?with_nvidia:ac_cv_NVCtrl_NVCtrl_h=no} \ | |
110 | ac_cv_prog_HAVE_CPPCHECK=no \ | |
111 | %{?with_ati:--with-libatiadl} | |
ba6485c5 | 112 | %{__make} -j1 |
7f2e242d ER |
113 | |
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
00e0389d ER |
116 | %{__make} install \ |
117 | DESTDIR=$RPM_BUILD_ROOT | |
7f2e242d | 118 | |
00e0389d ER |
119 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
120 | ||
121 | %find_lang %{name} | |
122 | ||
123 | # unsupported themes, or size. remove | |
124 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/ubuntu-mono-dark | |
125 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/ubuntu-mono-light | |
78254722 | 126 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/14x14 |
7f2e242d ER |
127 | |
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
90bfa8a0 | 131 | %post |
78254722 | 132 | %glib_compile_schemas |
90bfa8a0 | 133 | %update_desktop_database |
00e0389d | 134 | %update_icon_cache hicolor |
90bfa8a0 ER |
135 | |
136 | %postun | |
78254722 | 137 | %glib_compile_schemas |
90bfa8a0 | 138 | %update_desktop_database |
00e0389d | 139 | %update_icon_cache hicolor |
90bfa8a0 | 140 | |
00e0389d | 141 | %files -f %{name}.lang |
7f2e242d | 142 | %defattr(644,root,root,755) |
00e0389d ER |
143 | %doc AUTHORS NEWS README |
144 | %attr(755,root,root) %{_bindir}/psensor | |
145 | %attr(755,root,root) %{_bindir}/psensor-server | |
78254722 JB |
146 | %{_datadir}/%{name} |
147 | %{_datadir}/glib-2.0/schemas/psensor.gschema.xml | |
00e0389d | 148 | %{_mandir}/man1/psensor.1* |
78254722 | 149 | %{_mandir}/man1/psensor-server.1* |
00e0389d | 150 | %{_desktopdir}/psensor.desktop |
78254722 JB |
151 | %{_iconsdir}/hicolor/*x*/apps/psensor.png |
152 | %{_iconsdir}/hicolor/scalable/apps/psensor*.svg |