!1 Init package

Merge pull request !1 from 陈棋德/master
This commit is contained in:
openeuler-ci-bot 2020-07-31 19:45:03 +08:00 committed by Gitee
commit 35bc0752e2
3 changed files with 91 additions and 0 deletions

Binary file not shown.

80
xfce4-power-manager.spec Normal file
View File

@ -0,0 +1,80 @@
%global xfceversion 4.14
Name: xfce4-power-manager
Version: 1.6.6
Release: 1%{?dist}
Summary: A power manager for the Xfce desktop
License: GPLv2+
#Group: Development/Libraries
URL: http://goodies.xfce.org/projects/applications/%{name}
Source0: http://archive.xfce.org/src/xfce/%{name}/1.6/%{name}-%{version}.tar.bz2
Source1: %{name}.xml
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildArch: noarch
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libxfconf-0) >= %{xfceversion}
BuildRequires: pkgconfig(libxfce4ui-2) >= %{xfceversion}
BuildRequires: pkgconfig(libxfce4panel-1.0) >= %{xfceversion}
BuildRequires: pkgconfig(dbus-1) >= 0.60
BuildRequires: pkgconfig(dbus-glib-1) >= 0.70
BuildRequires: pkgconfig(libnotify) >= 0.4.1
BuildRequires: pkgconfig(xrandr) >= 1.2.0
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: libappstream-glib
BuildRequires: upower-devel
BuildRequires: xorg-x11-proto-devel >= 1.0.0
Requires: xfce4-panel >= %{xfceversion}
Requires: polkit
Requires: upower >= 0.99
%description
Xfce4 Power Manager manages the power sources of the computer and connected devices
(wireless mice, keyboards, media players etc.). It also allows users to control
the display backlight brightness and set power-saving modes for displays and monitors.
In addition, xfce4-power-manager provides a set of freedesktop-compliant DBus interfaces to
inform other applications about current power level so that they can adjust their power consumption.
%prep
%setup -q
%build
%configure
%make_build
%install
%make_install
# install xfpm default config
mkdir -p %{buildroot}%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml
cp -p %{SOURCE1} %{buildroot}%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/
%find_lang %{name}
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}-settings.desktop
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog NEWS README TODO
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/%{name}.xml
%{_bindir}/%{name}
%{_bindir}/%{name}-settings
%{_sbindir}/xfce4-pm-helper
%{_metainfodir}/%{name}.appdata.xml
%{_libdir}/xfce4/panel/plugins/libxfce4powermanager.so
%{_datadir}/xfce4/panel/plugins/power-manager-plugin.desktop
%{_sbindir}/xfpm-power-backlight-helper
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_datadir}/applications/%{name}-settings.desktop
%{_datadir}/icons/hicolor/*/*/*.*
%{_datadir}/polkit-1/actions/org.xfce.power.policy
%doc
%{_mandir}/man1/%{name}-settings.1.*
%{_mandir}/man1/%{name}.1.*
%changelog
* Sun Jul 12 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 1.6.6-1
- Init package

11
xfce4-power-manager.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-power-manager" version="1.0">
<property name="xfce4-power-manager" type="empty">
<property name="power-button-action" type="uint" value="3"/>
<property name="sleep-button-action" type="uint" value="3"/>
<property name="hibernate-button-action" type="uint" value="3"/>
<property name="show-tray-icon" type="bool" value="true"/>
<property name="logind-handle-lid-switch" type="bool" value="false"/>
</property>
</channel>