]> git.pld-linux.org Git - packages/mate-power-manager.git/blob - mate-power-manager.spec
- added upower 0.99.0 support patches from fedora
[packages/mate-power-manager.git] / mate-power-manager.spec
1 #
2 # Conditional build:
3 %bcond_with     gtk3    # use GTK+ 3.x instead of 2.x
4 %bcond_without  systemd # systemd inhibit service
5
6 Summary:        MATE power management service
7 Summary(pl.UTF-8):      Usługa zarządzania energią dla MATE
8 Name:           mate-power-manager
9 Version:        1.8.0
10 Release:        2
11 License:        GPL v2+
12 Group:          X11/Applications
13 Source0:        http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
14 # Source0-md5:  09688f0422adce20de79f17d2f7a07b0
15 Patch0:         uidir.patch
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
21 URL:            http://wiki.mate-desktop.org/mate-power-manager
22 BuildRequires:  autoconf >= 2.63
23 BuildRequires:  automake >= 1:1.9
24 BuildRequires:  cairo-devel >= 1.0.0
25 BuildRequires:  dbus-devel >= 1.0
26 BuildRequires:  dbus-glib-devel >= 0.70
27 BuildRequires:  desktop-file-utils
28 BuildRequires:  docbook-dtd41-sgml
29 BuildRequires:  docbook-utils
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
36 BuildRequires:  libgnome-keyring-devel >= 3.0.0
37 BuildRequires:  libnotify-devel >= 0.7.0
38 BuildRequires:  libtool >= 2:2
39 %{!?with_gtk3:BuildRequires:    libunique-devel >= 0.9.4}
40 %{?with_gtk3:BuildRequires:     libunique3-devel >= 3.0}
41 BuildRequires:  mate-common
42 BuildRequires:  mate-panel-devel >= 1.5.0
43 BuildRequires:  pkgconfig
44 BuildRequires:  popt-devel
45 BuildRequires:  rpmbuild(find_lang) >= 1.36
46 %{?with_systemd:BuildRequires:  systemd-devel >= 1:195}
47 BuildRequires:  tar >= 1:1.22
48 BuildRequires:  upower-devel >= 0.9.1
49 BuildRequires:  xorg-lib-libXrandr-devel >= 1.3
50 BuildRequires:  xorg-proto-xproto-devel >= 7.0.15
51 BuildRequires:  xz
52 BuildRequires:  yelp-tools
53 Requires:       cairo >= 1.0.0
54 Requires:       dbus >= 1.0
55 Requires:       dbus-glib >= 0.70
56 Requires:       glib2 >= 1:2.26.0
57 %{!?with_gtk2:Requires: gtk+2 >= 2:2.17.7}
58 %{?with_gtk3:Requires:  gtk+3 >= 3.0.0}
59 Requires:       gtk-update-icon-cache
60 Requires:       hicolor-icon-theme
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}
66 Requires:       mate-panel >= 1.5.0
67 Requires:       upower >= 0.9.1
68 Requires:       xorg-lib-libXrandr >= 1.3
69 Suggests:       udisks
70 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72 %define         _libexecdir     %{_libdir}/mate-panel
73
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
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
84 %prep
85 %setup -q
86 %patch0 -p1
87 %patch1 -p1
88 %patch2 -p1
89 %patch3 -p1
90 %patch4 -p1
91 %patch5 -p1
92
93 %build
94 %{__intltoolize}
95 %{__libtoolize}
96 %{__aclocal}
97 %{__autoconf}
98 %{__autoheader}
99 %{__automake}
100 %configure \
101         --enable-applets \
102         --disable-scrollkeeper \
103         --disable-silent-rules \
104         --disable-static \
105         %{?with_gtk3:--with-gtk=3.0} \
106         %{!?with_systemd:--without-systemdinhibit}
107
108 %{__make}
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112 %{__make} install \
113         INSTALL="install -p" \
114         DESTDIR=$RPM_BUILD_ROOT
115
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
118 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cmn
119
120 %find_lang %{name} --with-mate --with-omf
121
122 desktop-file-install \
123         --delete-original \
124         --remove-category=MATE \
125         --add-category=X-Mate \
126         --dir=$RPM_BUILD_ROOT%{_desktopdir} \
127         $RPM_BUILD_ROOT%{_desktopdir}/*.desktop
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)
142 %doc AUTHORS ChangeLog NEWS README
143 /etc/xdg/autostart/mate-power-manager.desktop
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
149 %attr(755,root,root) %{_libexecdir}/mate-brightness-applet
150 %attr(755,root,root) %{_libexecdir}/mate-inhibit-applet
151 %{_mandir}/man1/mate-power-manager.1*
152 %{_mandir}/man1/mate-power-preferences.1*
153 %{_mandir}/man1/mate-power-statistics.1*
154 %{_datadir}/%{name}
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
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
162 %{_datadir}/glib-2.0/schemas/org.mate.power-manager.gschema.xml
163 %{_datadir}/polkit-1/actions/org.mate.power.policy
164 %{_desktopdir}/mate-power-preferences.desktop
165 %{_desktopdir}/mate-power-statistics.desktop
166 %{_iconsdir}/hicolor/*/apps/mate-*.*
This page took 0.184164 seconds and 3 git commands to generate.