|
@@ -1,21 +1,26 @@
|
|
|
|
+%global quirkdbver 20100619
|
|
|
|
+
|
|
Summary: Power management utilities and scripts
|
|
Summary: Power management utilities and scripts
|
|
Summary(ja): 電源管理ユーティリティおよびスクリプト
|
|
Summary(ja): 電源管理ユーティリティおよびスクリプト
|
|
Name: pm-utils
|
|
Name: pm-utils
|
|
License: GPLv2
|
|
License: GPLv2
|
|
-Version: 1.2.6.1
|
|
|
|
-Release: 2%{?_dist_release}
|
|
|
|
|
|
+Version: 1.4.1
|
|
|
|
+Release: 1%{?_dist_release}
|
|
Group: System Environment/Base
|
|
Group: System Environment/Base
|
|
URL: http://pm-utils.freedesktop.org
|
|
URL: http://pm-utils.freedesktop.org
|
|
|
|
|
|
Source0: http://pm-utils.freedesktop.org/releases/pm-utils-%{version}.tar.gz
|
|
Source0: http://pm-utils.freedesktop.org/releases/pm-utils-%{version}.tar.gz
|
|
|
|
+Source1: http://pm-utils.freedesktop.org/releases/pm-quirks-%{quirkdbver}.tar.gz
|
|
|
|
|
|
-Source21: pm-utils-99hd-apm-restore
|
|
|
|
-Source22: pm-utils-hd-apm-restore.conf
|
|
|
|
Source23: pm-utils-bugreport-info.sh
|
|
Source23: pm-utils-bugreport-info.sh
|
|
|
|
|
|
Source100: 00tuxonice
|
|
Source100: 00tuxonice
|
|
Source101: tuxonice.sysconfig
|
|
Source101: tuxonice.sysconfig
|
|
|
|
|
|
|
|
+# Use append instead of write for init_logfile (#660329)
|
|
|
|
+Patch0: pm-utils-1.4.1-init-logfile-append.patch
|
|
|
|
+
|
|
|
|
+
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
BuildRequires: xmlto
|
|
BuildRequires: xmlto
|
|
# for chvt
|
|
# for chvt
|
|
@@ -23,8 +28,6 @@ Requires: kbd
|
|
#Requires: radeontool
|
|
#Requires: radeontool
|
|
# for hd apm settings
|
|
# for hd apm settings
|
|
Requires: hdparm
|
|
Requires: hdparm
|
|
-# for on_ac_power
|
|
|
|
-Requires: hal
|
|
|
|
%ifarch %{ix86} x86_64
|
|
%ifarch %{ix86} x86_64
|
|
Requires: vbetool
|
|
Requires: vbetool
|
|
%endif
|
|
%endif
|
|
@@ -50,7 +53,8 @@ when building programs that use %{name}.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
-
|
|
|
|
|
|
+tar -xzf %{SOURCE1}
|
|
|
|
+%patch0 -p1
|
|
|
|
|
|
%build
|
|
%build
|
|
%configure
|
|
%configure
|
|
@@ -59,23 +63,32 @@ make
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
+make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
-make install DESTDIR=%{buildroot}
|
|
|
|
-
|
|
|
|
-install -D -m 0600 /dev/null %{buildroot}%{_localstatedir}/log/pm-suspend.log
|
|
|
|
-mkdir -p %{buildroot}%{_localstatedir}/run/pm-utils/{locks,storage}
|
|
|
|
-
|
|
|
|
-install -D -m 0755 %{SOURCE21} %{buildroot}%{_libdir}/pm-utils/sleep.d/99hd-apm-restore.hook
|
|
|
|
-install -D -m 0644 %{SOURCE22} %{buildroot}%{_sysconfdir}/pm-utils-hd-apm-restore.conf
|
|
|
|
-
|
|
|
|
-install -D -m 0755 %{SOURCE23} %{buildroot}%{_bindir}/pm-utils-bugreport-info.sh
|
|
|
|
|
|
+install -D -m 0600 /dev/null $RPM_BUILD_ROOT%{_localstatedir}/log/pm-suspend.log
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/pm-utils/{locks,pm-suspend,pm-powersave}
|
|
|
|
+touch $RPM_BUILD_ROOT%{_localstatedir}/run/pm-utils/locks/{pm-suspend.lock,pm-powersave.lock}
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/pm-utils/{pm-suspend,pm-powersave}/storage
|
|
|
|
+install -D -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sbindir}/pm-utils-bugreport-info.sh
|
|
|
|
|
|
|
|
+# Install tuxonice staff
|
|
install -D -m 0755 %{SOURCE100} %{buildroot}%{_libdir}/pm-utils/sleep.d/00tuxonice
|
|
install -D -m 0755 %{SOURCE100} %{buildroot}%{_libdir}/pm-utils/sleep.d/00tuxonice
|
|
install -D -m 0644 %{SOURCE101} %{buildroot}%{_sysconfdir}/sysconfig/tuxonice
|
|
install -D -m 0644 %{SOURCE101} %{buildroot}%{_sysconfdir}/sysconfig/tuxonice
|
|
|
|
|
|
|
|
+# Install quirks
|
|
|
|
+cp -r video-quirks $RPM_BUILD_ROOT%{_libdir}/pm-utils
|
|
|
|
+
|
|
|
|
+# These break more than they helps, so drop them for now
|
|
|
|
+rm $RPM_BUILD_ROOT%{_libdir}/pm-utils/power.d/*
|
|
|
|
+
|
|
# VINE: documents handled directly with %%doc directive in the %%files section
|
|
# VINE: documents handled directly with %%doc directive in the %%files section
|
|
rm -rf %{buildroot}%{_datadir}/doc/pm-utils
|
|
rm -rf %{buildroot}%{_datadir}/doc/pm-utils
|
|
|
|
|
|
|
|
+%preun
|
|
|
|
+# Clean storage to prevent left-behind files. These files are dynamically
|
|
|
|
+# created in runtime (also with dynamic names), thus it is hard to track
|
|
|
|
+# them individually.
|
|
|
|
+rm -rf %{_localstatedir}/run/pm-utils/{pm-suspend,pm-powersave}/storage/*
|
|
|
|
|
|
%clean
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
@@ -84,7 +97,6 @@ rm -rf %{buildroot}
|
|
%files
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS COPYING ChangeLog NEWS README* TODO pm/HOWTO*
|
|
%doc AUTHORS COPYING ChangeLog NEWS README* TODO pm/HOWTO*
|
|
-%config(noreplace) %{_sysconfdir}/pm-utils-hd-apm-restore.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/tuxonice
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/tuxonice
|
|
%{_sysconfdir}/pm/
|
|
%{_sysconfdir}/pm/
|
|
%dir %{_libdir}/pm-utils/
|
|
%dir %{_libdir}/pm-utils/
|
|
@@ -92,12 +104,11 @@ rm -rf %{buildroot}
|
|
%{_libdir}/pm-utils/defaults
|
|
%{_libdir}/pm-utils/defaults
|
|
%{_libdir}/pm-utils/functions
|
|
%{_libdir}/pm-utils/functions
|
|
%{_libdir}/pm-utils/pm-functions
|
|
%{_libdir}/pm-utils/pm-functions
|
|
-%{_libdir}/pm-utils/power.d/
|
|
|
|
-%{_libdir}/pm-utils/sleep.d/
|
|
|
|
-%{_libdir}/pm-utils/module.d
|
|
|
|
|
|
+%{_libdir}/pm-utils/module.d/*
|
|
|
|
+%{_libdir}/pm-utils/sleep.d/*
|
|
%{_bindir}/on_ac_power
|
|
%{_bindir}/on_ac_power
|
|
%{_bindir}/pm-is-supported
|
|
%{_bindir}/pm-is-supported
|
|
-%{_bindir}/pm-utils-bugreport-info.sh
|
|
|
|
|
|
+%{_sbindir}/pm-utils-bugreport-info.sh
|
|
%{_sbindir}/pm-hibernate
|
|
%{_sbindir}/pm-hibernate
|
|
%{_sbindir}/pm-powersave
|
|
%{_sbindir}/pm-powersave
|
|
%{_sbindir}/pm-suspend
|
|
%{_sbindir}/pm-suspend
|
|
@@ -105,8 +116,8 @@ rm -rf %{buildroot}
|
|
%{_mandir}/man1/*.1.gz
|
|
%{_mandir}/man1/*.1.gz
|
|
%{_mandir}/man8/*.8.gz
|
|
%{_mandir}/man8/*.8.gz
|
|
%{_localstatedir}/run/pm-utils/
|
|
%{_localstatedir}/run/pm-utils/
|
|
-#%dir %{_datadir}/doc/pm-utils
|
|
|
|
-#%doc %{_datadir}/doc/pm-utils/*
|
|
|
|
|
|
+%{_libdir}/pm-utils/video-quirks
|
|
|
|
+
|
|
|
|
|
|
# no logrotate needed, because only one run of pm-utils is stored
|
|
# no logrotate needed, because only one run of pm-utils is stored
|
|
# in the logfile
|
|
# in the logfile
|
|
@@ -119,6 +130,9 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Wed Mar 09 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.1-1
|
|
|
|
+- new upstream release
|
|
|
|
+
|
|
* Sat Oct 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.2.6.1-2
|
|
* Sat Oct 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.2.6.1-2
|
|
- rebuilt with rpm-4.8.1 for pkg-config
|
|
- rebuilt with rpm-4.8.1 for pkg-config
|
|
|
|
|