]>
Commit | Line | Data |
---|---|---|
dff27893 ER |
1 | # |
2 | # Conditional build: | |
60b97626 JB |
3 | %bcond_with gtk3 # use GTK+ 3.x instead of 2.x |
4 | %bcond_without systemd # systemd inhibit service | |
dff27893 | 5 | |
85ccafd9 | 6 | Summary: MATE power management service |
60b97626 | 7 | Summary(pl.UTF-8): Usługa zarządzania energią dla MATE |
85ccafd9 | 8 | Name: mate-power-manager |
37a92ccc | 9 | Version: 1.8.0 |
51e6162a | 10 | Release: 2 |
85ccafd9 ER |
11 | License: GPL v2+ |
12 | Group: X11/Applications | |
37a92ccc JP |
13 | Source0: http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz |
14 | # Source0-md5: 09688f0422adce20de79f17d2f7a07b0 | |
15 | Patch0: uidir.patch | |
51e6162a JR |
16 | Patch1: mate-power-manager_upower.patch |
17 | Patch2: mate-power-manager_upower-remove-recall.patch | |
18 | Patch3: mate-power-manager_upower-use-g_signal-notify.patch | |
19 | Patch4: mate-power-manager_upower-update-for-libupower-glib-API-changes.patch | |
20 | Patch5: mate-power-manager_fix-use-g_signal-notify.patch | |
85ccafd9 | 21 | URL: http://wiki.mate-desktop.org/mate-power-manager |
60b97626 JB |
22 | BuildRequires: autoconf >= 2.63 |
23 | BuildRequires: automake >= 1:1.9 | |
85ccafd9 | 24 | BuildRequires: cairo-devel >= 1.0.0 |
60b97626 JB |
25 | BuildRequires: dbus-devel >= 1.0 |
26 | BuildRequires: dbus-glib-devel >= 0.70 | |
85ccafd9 | 27 | BuildRequires: desktop-file-utils |
79ce4b1e ER |
28 | BuildRequires: docbook-dtd41-sgml |
29 | BuildRequires: docbook-utils | |
60b97626 JB |
30 | BuildRequires: gettext-devel >= 0.10.40 |
31 | BuildRequires: glib2-devel >= 1:2.26.0 | |
32 | %{!?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.17.7} | |
33 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
34 | BuildRequires: intltool >= 0.35.0 | |
35 | BuildRequires: libcanberra-gtk-devel >= 0.10 | |
37a92ccc | 36 | BuildRequires: libgnome-keyring-devel >= 3.0.0 |
d27d91ff | 37 | BuildRequires: libnotify-devel >= 0.7.0 |
60b97626 JB |
38 | BuildRequires: libtool >= 2:2 |
39 | %{!?with_gtk3:BuildRequires: libunique-devel >= 0.9.4} | |
40 | %{?with_gtk3:BuildRequires: libunique3-devel >= 3.0} | |
85ccafd9 | 41 | BuildRequires: mate-common |
60b97626 JB |
42 | BuildRequires: mate-panel-devel >= 1.5.0 |
43 | BuildRequires: pkgconfig | |
85ccafd9 | 44 | BuildRequires: popt-devel |
85ccafd9 | 45 | BuildRequires: rpmbuild(find_lang) >= 1.36 |
dff27893 | 46 | %{?with_systemd:BuildRequires: systemd-devel >= 1:195} |
85ccafd9 | 47 | BuildRequires: tar >= 1:1.22 |
60b97626 JB |
48 | BuildRequires: upower-devel >= 0.9.1 |
49 | BuildRequires: xorg-lib-libXrandr-devel >= 1.3 | |
50 | BuildRequires: xorg-proto-xproto-devel >= 7.0.15 | |
85ccafd9 | 51 | BuildRequires: xz |
37a92ccc | 52 | BuildRequires: yelp-tools |
60b97626 JB |
53 | Requires: cairo >= 1.0.0 |
54 | Requires: dbus >= 1.0 | |
55 | Requires: dbus-glib >= 0.70 | |
85ccafd9 | 56 | Requires: glib2 >= 1:2.26.0 |
60b97626 JB |
57 | %{!?with_gtk2:Requires: gtk+2 >= 2:2.17.7} |
58 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
85ccafd9 ER |
59 | Requires: gtk-update-icon-cache |
60 | Requires: hicolor-icon-theme | |
60b97626 JB |
61 | Requires: libcanberra-gtk >= 0.10 |
62 | Requires: libgnome-keyring >= 0.6.0 | |
63 | Requires: libnotify >= 0.7.0 | |
64 | %{!?with_gtk3:Requires: libunique >= 0.9.4} | |
65 | %{?with_gtk3:Requires: libunique3 >= 3.0} | |
b318a16c | 66 | Requires: mate-panel >= 1.5.0 |
60b97626 JB |
67 | Requires: upower >= 0.9.1 |
68 | Requires: xorg-lib-libXrandr >= 1.3 | |
ffff9b3d | 69 | Suggests: udisks |
85ccafd9 ER |
70 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
71 | ||
b318a16c ER |
72 | %define _libexecdir %{_libdir}/mate-panel |
73 | ||
85ccafd9 ER |
74 | %description |
75 | MATE Power Manager uses the information and facilities provided by | |
76 | UPower displaying icons and handling user callbacks in an interactive | |
77 | MATE session. | |
78 | ||
60b97626 JB |
79 | %description -l pl.UTF-8 |
80 | MATE Power Manager wykorzystuje informacje i funkcje udostępniane | |
81 | przez UPower do wyświetlania ikon i obsługi reakcji użytkownika w | |
82 | interaktywnej sesji MATE. | |
83 | ||
85ccafd9 ER |
84 | %prep |
85 | %setup -q | |
37a92ccc | 86 | %patch0 -p1 |
51e6162a JR |
87 | %patch1 -p1 |
88 | %patch2 -p1 | |
89 | %patch3 -p1 | |
90 | %patch4 -p1 | |
91 | %patch5 -p1 | |
85ccafd9 ER |
92 | |
93 | %build | |
60b97626 | 94 | %{__intltoolize} |
224f5aa8 ER |
95 | %{__libtoolize} |
96 | %{__aclocal} | |
97 | %{__autoconf} | |
60b97626 | 98 | %{__autoheader} |
224f5aa8 | 99 | %{__automake} |
85ccafd9 | 100 | %configure \ |
60b97626 JB |
101 | --enable-applets \ |
102 | --disable-scrollkeeper \ | |
85ccafd9 ER |
103 | --disable-silent-rules \ |
104 | --disable-static \ | |
60b97626 JB |
105 | %{?with_gtk3:--with-gtk=3.0} \ |
106 | %{!?with_systemd:--without-systemdinhibit} | |
85ccafd9 ER |
107 | |
108 | %{__make} | |
109 | ||
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | %{__make} install \ | |
ffff9b3d | 113 | INSTALL="install -p" \ |
85ccafd9 ER |
114 | DESTDIR=$RPM_BUILD_ROOT |
115 | ||
d27d91ff ER |
116 | # mate < 1.5 did not exist in pld, avoid dependency on mate-conf |
117 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/MateConf/gsettings/mate-power-manager.convert | |
37a92ccc | 118 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cmn |
d27d91ff | 119 | |
85ccafd9 ER |
120 | %find_lang %{name} --with-mate --with-omf |
121 | ||
122 | desktop-file-install \ | |
60b97626 JB |
123 | --delete-original \ |
124 | --remove-category=MATE \ | |
125 | --add-category=X-Mate \ | |
126 | --dir=$RPM_BUILD_ROOT%{_desktopdir} \ | |
127 | $RPM_BUILD_ROOT%{_desktopdir}/*.desktop | |
85ccafd9 ER |
128 | |
129 | %clean | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %post | |
133 | %update_icon_cache hicolor | |
134 | %glib_compile_schemas | |
135 | ||
136 | %postun | |
137 | %update_icon_cache hicolor | |
138 | %glib_compile_schemas | |
139 | ||
140 | %files -f %{name}.lang | |
141 | %defattr(644,root,root,755) | |
60b97626 | 142 | %doc AUTHORS ChangeLog NEWS README |
b318a16c | 143 | /etc/xdg/autostart/mate-power-manager.desktop |
85ccafd9 ER |
144 | %attr(755,root,root) %{_bindir}/mate-power-bugreport.sh |
145 | %attr(755,root,root) %{_bindir}/mate-power-manager | |
146 | %attr(755,root,root) %{_bindir}/mate-power-preferences | |
147 | %attr(755,root,root) %{_bindir}/mate-power-statistics | |
148 | %attr(755,root,root) %{_sbindir}/mate-power-backlight-helper | |
60b97626 JB |
149 | %attr(755,root,root) %{_libexecdir}/mate-brightness-applet |
150 | %attr(755,root,root) %{_libexecdir}/mate-inhibit-applet | |
85ccafd9 ER |
151 | %{_mandir}/man1/mate-power-manager.1* |
152 | %{_mandir}/man1/mate-power-preferences.1* | |
153 | %{_mandir}/man1/mate-power-statistics.1* | |
b318a16c | 154 | %{_datadir}/%{name} |
b318a16c ER |
155 | %{_datadir}/mate-panel/applets/org.mate.BrightnessApplet.mate-panel-applet |
156 | %{_datadir}/mate-panel/applets/org.mate.InhibitApplet.mate-panel-applet | |
157 | %{_datadir}/mate-panel/ui/brightness-applet-menu.xml | |
158 | %{_datadir}/mate-panel/ui/inhibit-applet-menu.xml | |
85ccafd9 ER |
159 | %{_datadir}/dbus-1/services/mate-power-manager.service |
160 | %{_datadir}/dbus-1/services/org.mate.panel.applet.BrightnessAppletFactory.service | |
161 | %{_datadir}/dbus-1/services/org.mate.panel.applet.InhibitAppletFactory.service | |
85ccafd9 | 162 | %{_datadir}/glib-2.0/schemas/org.mate.power-manager.gschema.xml |
b318a16c | 163 | %{_datadir}/polkit-1/actions/org.mate.power.policy |
60b97626 JB |
164 | %{_desktopdir}/mate-power-preferences.desktop |
165 | %{_desktopdir}/mate-power-statistics.desktop | |
166 | %{_iconsdir}/hicolor/*/apps/mate-*.* |