- Add missing packages to package files section. OBS-URL: https://build.opensuse.org/request/show/661512 OBS-URL: https://build.opensuse.org/package/show/utilities/pm-utils?expand=0&rev=63
135 lines
5.1 KiB
RPMSpec
135 lines
5.1 KiB
RPMSpec
#
|
|
# spec file for package pm-utils
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
# Please submit patches to git://github.com/openSUSE/pm-utils
|
|
%define pm_libdir %{_libexecdir}/%{name}/
|
|
%define pm_quirkdbdir %{pm_libdir}/video-quirks
|
|
%define pm_sysconfdir %{_sysconfdir}/pm/config.d/
|
|
%define gitversion 20131024
|
|
Name: pm-utils
|
|
Version: 1.4.1
|
|
Release: 0
|
|
Summary: Tools to suspend and hibernate computers
|
|
License: GPL-2.0
|
|
Group: System/Base
|
|
Url: http://pm-utils.freedesktop.org/wiki/
|
|
# http://github.com/openSUSE/pm-utils
|
|
Source0: %{name}-%{version}-suse-%{gitversion}.tar.bz2
|
|
Source1: http://pm-utils.freedesktop.org/releases/pm-quirks-20100316.tar.bz2
|
|
# PATCH-FIX-OPENSUSE fix-99Zgrub-resume.patch boo#856391 wbauer@tmo.at -- fix removal of set boot entry on resume in 99Zgrub
|
|
Patch0: fix-99Zgrub-resume.patch
|
|
Patch1: pm-utils-fix-bashisms.patch
|
|
# PATCH-FIX-OPENSUSE change-defaults.patch wbauer@tmo.at -- use kernel method for suspend/hibernate by default instead of the broken uswsusp (boo#925873)
|
|
Patch2: change-defaults.patch
|
|
# hooks requires some external tools
|
|
BuildRequires: autoconf
|
|
BuildRequires: m4
|
|
BuildRequires: perl
|
|
BuildRequires: xmlto
|
|
Requires: coreutils
|
|
Requires: ethtool
|
|
Requires: gawk
|
|
Requires: grep
|
|
Requires: modutils
|
|
Requires: sed
|
|
Requires: upower
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
pm-utils provide simple shell command line tools to suspend and
|
|
hibernate computers that can be used to run vendor or distro supplied
|
|
scripts on suspend and resume.
|
|
|
|
%package ndiswrapper
|
|
Summary: The pm-utils hook for ndiswrapper
|
|
Group: System/Base
|
|
Requires: %{name} = %{version}
|
|
Supplements: ndiswrapper
|
|
|
|
%description ndiswrapper
|
|
pm-utils provide simple shell command line tools to suspend and
|
|
hibernate computers that can be used to run vendor or distro supplied
|
|
scripts on suspend and resume. This package installs the 75ndiswrapper hook.
|
|
|
|
%prep
|
|
%setup -q -n %{name} -a 1
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
|
|
%build
|
|
%configure \
|
|
--docdir=%{_defaultdocdir}/%{name} \
|
|
--libdir=%{_prefix}/lib
|
|
make -d %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
# bnc#663067
|
|
rm -r %{buildroot}/%{pm_libdir}/power.d/
|
|
# ibm bluetooth radio state handling was fixed
|
|
# http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/platform/x86/thinkpad_acpi.c?id=208b996b6c460285650d39b2330f8ef82c007d10
|
|
rm %{buildroot}/%{pm_libdir}/sleep.d/49bluetooth
|
|
#FIXME: should be installed by make install
|
|
install -m 644 man/*.1 %{buildroot}/%{_mandir}/man1
|
|
install -m 644 man/*.8 %{buildroot}/%{_mandir}/man8
|
|
#quirks
|
|
install -d -m 0755 %{buildroot}%{pm_quirkdbdir}
|
|
install -m 0644 *.quirkdb %{buildroot}%{pm_quirkdbdir}
|
|
#SUSE hooks
|
|
install -m 0755 pm/sleep.d/02rtcwake %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/06autofs %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/30s2disk-check %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/45pcmcia %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/50rcnetwork %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/75ndiswrapper %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0755 pm/sleep.d/99info %{buildroot}/%{pm_libdir}/sleep.d/
|
|
install -m 0644 pm/config.d/* %{buildroot}/%{pm_sysconfdir}/
|
|
# powersave command is back
|
|
install -m 0755 bin/powersave %{buildroot}/%{_bindir}
|
|
install -d -m 0755 %{buildroot}/%{_localstatedir}/log
|
|
touch %{buildroot}/%{_localstatedir}/log/pm-suspend.log
|
|
# changing libdir in configure has the side-effect of misinstalling the
|
|
# pkg-config file (/usr/lib/pkgconfig is not searched on x86_64). Since we have
|
|
# no arch-specific data, we put it in datadir.
|
|
install -d -m 0755 %{buildroot}%{_datadir}/pkgconfig
|
|
mv %{buildroot}%{_libexecdir}/pkgconfig/%{name}.pc %{buildroot}%{_datadir}/pkgconfig
|
|
|
|
%files
|
|
%defattr (-,root,root)
|
|
%doc README AUTHORS README.smart-suspend-to-RAM
|
|
%doc %{_docdir}/pm-utils/HOWTO.*
|
|
%doc %{_docdir}/pm-utils/README.*
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
%{_sbindir}/*
|
|
%dir %{_sysconfdir}/pm
|
|
%{_sysconfdir}/pm/*
|
|
%config(noreplace) %{_sysconfdir}/pm/config.d/rtcwake.config
|
|
%{pm_libdir}
|
|
%exclude %{pm_libdir}/sleep.d/75ndiswrapper
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man8/*
|
|
%ghost %verify(not md5 size mtime) %{_localstatedir}/log/pm-suspend.log
|
|
%{_datadir}/pkgconfig/%{name}.pc
|
|
|
|
%files ndiswrapper
|
|
%defattr (-,root,root)
|
|
%{pm_libdir}/sleep.d/75ndiswrapper
|
|
|
|
%changelog
|