lkundrak / rpms / tlp

Forked from rpms/tlp 4 years ago
Clone
alexjnewt@hotmail.com bfafd3d
Name:           tlp
Mystro256 2042248
Version:        1.2.2
fc9f9bc
Release:        3%{?dist}
alexjnewt@hotmail.com bfafd3d
Summary:        Advanced power management tool for Linux
alexjnewt@hotmail.com bfafd3d
License:        GPLv2+
Mystro256 2fb530a
URL:            http://linrunner.de/en/tlp/tlp.html
Mystro256 fbe8a20
Source0:        https://github.com/linrunner/TLP/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
fc9f9bc
Patch0:         0001-Move-the-NetworkManager-dispatcher-script-out-of-etc.patch
alexjnewt@hotmail.com bfafd3d
#Provided by Andreas Roederer <tlp~at~warpnine~dot~de>:
alexjnewt@hotmail.com bfafd3d
Source1:        50-tlp.preset
Mystro256 dbad489
0770505
BuildRequires:  perl-generators
alexjnewt@hotmail.com bfafd3d
BuildRequires:  systemd
Mystro256 35facf7
BuildRequires:  libappstream-glib
Mystro256 dbad489
alexjnewt@hotmail.com bfafd3d
#The following requires are not detected:
alexjnewt@hotmail.com bfafd3d
Requires:       ethtool
alexjnewt@hotmail.com bfafd3d
Requires:       hdparm
alexjnewt@hotmail.com bfafd3d
Requires:       iw
alexjnewt@hotmail.com bfafd3d
Requires:       redhat-lsb-core
alexjnewt@hotmail.com bfafd3d
Requires:       rfkill
alexjnewt@hotmail.com bfafd3d
Requires:       systemd
alexjnewt@hotmail.com bfafd3d
Requires:       udev
alexjnewt@hotmail.com bfafd3d
Requires:       usbutils
alexjnewt@hotmail.com d2e3af3
Requires:       pciutils
Mystro256 35facf7
Recommends:     kernel-tools
Mystro256 dbad489
Jeremy aae87d3
#Note: Conflicts with laptop-mode-tools
Jeremy aae87d3
#Makes sure laptop_mode isn't being used:
alexjnewt@hotmail.com bfafd3d
Conflicts:      %{_sbindir}/laptop_mode
alexjnewt@hotmail.com bfafd3d
BuildArch:      noarch
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%description
Mystro256 fbe8a20
TLP is an advanced power management tool for Linux. It comes with a
Mystro256 fbe8a20
default configuration already optimized for battery life. At the same
Mystro256 fbe8a20
time it is highly customizable to fulfill specific user requirements.
Mystro256 fbe8a20
Mystro256 fbe8a20
TLP supplies separate settings profiles for AC and battery power and can
Mystro256 fbe8a20
enable or disable Bluetooth, WiFi and WWAN radio devices upon system start-up.
Mystro256 fbe8a20
Mystro256 fbe8a20
For ThinkPads it provides a unified way to configure charging thresholds and
Mystro256 fbe8a20
re-calibrate the battery for all models which support it (via tp-smapi or
Mystro256 fbe8a20
acpi-call).
Mystro256 fbe8a20
Mystro256 fbe8a20
TLP is a pure command line tool with automated background tasks, it
Mystro256 fbe8a20
does not contain a GUI.
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%package rdw
alexjnewt@hotmail.com bfafd3d
Summary:        Radio Device Wizard for TLP
fc9f9bc
Requires:       NetworkManager >= 1.20
alexjnewt@hotmail.com bfafd3d
Requires:       %{name} = %{version}-%{release}
alexjnewt@hotmail.com bfafd3d
BuildArch:      noarch
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%description rdw
Mystro256 fbe8a20
Radio device wizard is an add-on to TLP. It provides event based
Mystro256 fbe8a20
switching of:
Mystro256 fbe8a20
 - Bluetooth, WiFi, WWAN radio devices
Mystro256 fbe8a20
 - upon network connect/disconnect
Mystro256 fbe8a20
 - and dock/undock
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%prep
Mystro256 dbad489
%autosetup -n TLP-%{version}
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%build
Mystro256 553e3d8
%make_build
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%install
Mystro256 2042248
%make_install \
Mystro256 2042248
	TLP_NO_INIT=1 \
Mystro256 2042248
	TLP_WITH_ELOGIND=0 \
Mystro256 2042248
	TLP_SYSD=%{_unitdir} \
Mystro256 2042248
	TLP_ULIB=%{_udevrulesdir}/..
alexjnewt@hotmail.com bfafd3d
#Install manpages:
Mystro256 dbad489
make install-man DESTDIR=%{buildroot}
Mystro256 fbe8a20
make install-man-rdw DESTDIR=%{buildroot}
alexjnewt@hotmail.com bfafd3d
#Install preset (source 1):
alexjnewt@hotmail.com bfafd3d
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_presetdir}/50-tlp.preset
alexjnewt@hotmail.com bfafd3d
Mystro256 35facf7
%check
Mystro256 35facf7
appstream-util validate-relax --nonet \
Mystro256 35facf7
  %{buildroot}/%{_datadir}/metainfo/*.xml
Mystro256 35facf7
alexjnewt@hotmail.com bfafd3d
%files
alexjnewt@hotmail.com bfafd3d
%config(noreplace) %{_sysconfdir}/default/tlp
Mystro256 fbe8a20
%license LICENSE
Mystro256 fbe8a20
%doc COPYING README.md changelog
alexjnewt@hotmail.com bfafd3d
%{_bindir}/*
Mystro256 fbe8a20
%exclude %{_bindir}/tlp-rdw
alexjnewt@hotmail.com bfafd3d
%{_sbindir}/*
alexjnewt@hotmail.com bfafd3d
%{_mandir}/man*/*
Mystro256 fbe8a20
%exclude %{_mandir}/man*/tlp-rdw*
Mystro256 553e3d8
%{_datadir}/tlp
Jeremy Newton bda8064
%{_udevrulesdir}/85-tlp.rules
alexjnewt@hotmail.com bfafd3d
%{_udevrulesdir}/../tlp-usb-udev
Mystro256 dbad489
%{_datadir}/bash-completion/completions/*
Mystro256 fbe8a20
%exclude %{_datadir}/bash-completion/completions/tlp-rdw
Jeremy Newton bda8064
%{_presetdir}/50-tlp.preset
alexjnewt@hotmail.com bfafd3d
%{_unitdir}/*.service
Mystro256 35facf7
%{_datadir}/metainfo/*.metainfo.xml
Jeremy aae87d3
alexjnewt@hotmail.com bfafd3d
%files rdw
Mystro256 fbe8a20
%doc COPYING README.md changelog
Mystro256 fbe8a20
%{_bindir}/tlp-rdw
Mystro256 fbe8a20
%{_mandir}/man*/tlp-rdw*
fc9f9bc
%{_prefix}/lib/NetworkManager/dispatcher.d/99tlp-rdw-nm
Jeremy Newton 97ebcd6
%{_udevrulesdir}/85-tlp-rdw.rules
alexjnewt@hotmail.com bfafd3d
%{_udevrulesdir}/../tlp-rdw-udev
Mystro256 fbe8a20
%{_datadir}/bash-completion/completions/tlp-rdw
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%post
alexjnewt@hotmail.com bfafd3d
%systemd_post tlp.service
alexjnewt@hotmail.com bfafd3d
%systemd_post tlp-sleep.service
Mystro256 de5b2df
systemctl mask systemd-rfkill.service
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%preun
alexjnewt@hotmail.com bfafd3d
%systemd_preun tlp.service
alexjnewt@hotmail.com bfafd3d
%systemd_preun tlp-sleep.service
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%postun
alexjnewt@hotmail.com bfafd3d
%systemd_postun_with_restart tlp.service
alexjnewt@hotmail.com bfafd3d
%systemd_postun_with_restart tlp-sleep.service
Mystro256 e7e9dbc
if [ $1 -eq 0 ] ; then
Mystro256 e7e9dbc
    systemctl unmask systemd-rfkill.service
Mystro256 e7e9dbc
fi
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%post rdw
alexjnewt@hotmail.com bfafd3d
/bin/systemctl enable NetworkManager-dispatcher.service >/dev/null 2>&1 || :
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%changelog
fc9f9bc
* Thu Aug 22 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.2.2-3
fc9f9bc
- Move the NetworkManager dispatcher script out of /etc
fc9f9bc
ded1732
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-2
ded1732
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ded1732
Mystro256 2042248
* Mon Jun 10 2019 Jeremy Newton <alexjnewt at hotmail dot com> - 1.2.2-1
Mystro256 2042248
- Update to 1.2.2
Mystro256 2042248
Mystro256 fbe8a20
* Mon Mar 18 2019 Jeremy Newton <alexjnewt at hotmail dot com> - 1.2.1-1
Mystro256 fbe8a20
- Update to 1.2.1
Mystro256 fbe8a20
- Modernize SPEC file
Mystro256 fbe8a20
cac0139
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
cac0139
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cac0139
2a52b55
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
2a52b55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2a52b55
Mystro256 35facf7
* Fri Feb 23 2018 Jeremy Newton <alexjnewt at hotmail dot com> - 1.1-1
Mystro256 35facf7
- Update to 1.1
Mystro256 35facf7
- Add weak require for kernel-tools
Mystro256 35facf7
5c1cb18
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4
5c1cb18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5c1cb18
Mystro256 0658949
* Sun Sep 03 2017 Jeremy Newton <alexjnewt at hotmail dot com> - 1.0-3
Mystro256 b88527a
- Remove kernel-tools require, fixes s390x
Mystro256 b88527a
280046c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-2
280046c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
280046c
Mystro256 553e3d8
* Sun Jun 18 2017 Jeremy Newton <alexjnewt at hotmail dot com> - 1.0-1
Mystro256 553e3d8
- Update to 1.0
Mystro256 553e3d8
Mystro256 4dfb518
* Mon Mar 20 2017 Jeremy Newton <alexjnewt at hotmail dot com> - 0.9-5
Mystro256 4dfb518
- Cherry-pick upstream fix for mitigate slow shutdown
Mystro256 4dfb518
Mystro256 8210c43
* Thu Mar 02 2017 Jeremy Newton <alexjnewt at hotmail dot com> - 0.9-4
Mystro256 8210c43
- Cherry-pick upstream fix for tlp-stat
Mystro256 8210c43
6c4485f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-3
6c4485f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6c4485f
Mystro256 de5b2df
* Sun Jan 15 2017 Jeremy Newton <alexjnewt at hotmail dot com> - 0.9-2
Mystro256 de5b2df
- Fix rfkill service masking
Mystro256 de5b2df
Mystro256 dbad489
* Sun Aug 28 2016 Jeremy Newton <alexjnewt at hotmail dot com> - 0.9-1
Mystro256 dbad489
- Update to 0.9
Mystro256 dbad489
Mystro256 dbad489
* Wed Feb 24 2016 Jeremy Newton <alexjnewt at hotmail dot com> - 0.8-3
Jeremy aae87d3
- Fix rpmlint warnings/errors
Jeremy aae87d3
1a2a66e
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-2
1a2a66e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1a2a66e
Mystro256 dbad489
* Sat Aug 22 2015 Jeremy Newton <alexjnewt at hotmail dot com> - 0.8-1
Jeremy Newton b3cb2b8
- Update to 0.8
Jeremy Newton b3cb2b8
eb8a7e6
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-5
eb8a7e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
eb8a7e6
Mystro256 dbad489
* Mon May 11 2015 Jeremy Newton <alexjnewt at hotmail dot com> - 0.7-4
Jeremy Newton f05b781
- Use workaround to avoid conflict with systemd
Jeremy Newton f05b781
Mystro256 dbad489
* Mon May 11 2015 Jeremy Newton <alexjnewt at hotmail dot com> - 0.7-3
Jeremy Newton 80ab72e
- Fix rfkill conflict
Jeremy Newton 80ab72e
Mystro256 dbad489
* Tue Feb 3 2015 Jeremy Newton <alexjnewt at hotmail dot com> - 0.7-2
Jeremy Newton 1446d05
- Fix a typo in the spec file
Jeremy Newton 1446d05
Mystro256 dbad489
* Sat Jan 31 2015 Jeremy Newton <alexjnewt at hotmail dot com> - 0.7-1
Jeremy Newton 64e3a0b
- New Version
Jeremy Newton 64e3a0b
Mystro256 dbad489
* Mon Nov 17 2014 Jeremy Newton <alexjnewt at hotmail dot com> - 0.6-3
alexjnewt@hotmail.com c6d4dca
- Wireless-tools removed as a dependency
alexjnewt@hotmail.com c6d4dca
Mystro256 dbad489
* Tue Nov 04 2014 Jeremy Newton <alexjnewt at hotmail dot com> - 0.6-2
alexjnewt@hotmail.com d2e3af3
- Missing Dependancy
alexjnewt@hotmail.com d2e3af3
Mystro256 dbad489
* Mon Oct 27 2014 Jeremy Newton <alexjnewt at hotmail dot com> - 0.6-1
alexjnewt@hotmail.com b7b43df
- New Upstream Version
ed7cfdc
Mystro256 dbad489
* Mon Apr 21 2014 Jeremy Newton <alexjnewt at hotmail dot com> - 0.5-2
alexjnewt@hotmail.com bfafd3d
- Various tweaking
alexjnewt@hotmail.com bfafd3d
- Move bashcompletion file to silence rpmlint warning
alexjnewt@hotmail.com bfafd3d
Mystro256 dbad489
* Sun Apr 20 2014 Jeremy Newton <alexjnewt at hotmail dot com> - 0.5-1
alexjnewt@hotmail.com bfafd3d
- Initial fedora package