alexjnewt@hotmail.com bfafd3d
Name:           tlp
Mystro256 dbad489
Version:        0.9
Mystro256 de5b2df
Release:        2%{?dist}
alexjnewt@hotmail.com bfafd3d
Summary:        Advanced power management tool for Linux
alexjnewt@hotmail.com bfafd3d
License:        GPLv2+
alexjnewt@hotmail.com bfafd3d
URL:            http://linrunner.de/tlp
alexjnewt@hotmail.com bfafd3d
Source0:        https://github.com/linrunner/TLP/archive/%{version}.tar.gz
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 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
Jeremy Newton 64e3a0b
Requires:       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
alexjnewt@hotmail.com bfafd3d
TLP brings you the benefits of advanced power management for Linux
alexjnewt@hotmail.com bfafd3d
without the need to understand every technical detail. TLP comes
alexjnewt@hotmail.com bfafd3d
with a default configuration already optimized for battery life.
alexjnewt@hotmail.com bfafd3d
Also an optional install of the smartmontools package enables hard
alexjnewt@hotmail.com bfafd3d
disk SMART data in tlp-stat (smartctl).
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%package rdw
alexjnewt@hotmail.com bfafd3d
Summary:        Radio Device Wizard for TLP
alexjnewt@hotmail.com bfafd3d
Requires:       NetworkManager
alexjnewt@hotmail.com bfafd3d
Requires:       %{name} = %{version}-%{release}
alexjnewt@hotmail.com bfafd3d
BuildArch:      noarch
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%description rdw
alexjnewt@hotmail.com bfafd3d
Radio Device Wizard for TLP automatically toggles wireless networking
alexjnewt@hotmail.com bfafd3d
based on dock events and the Network Manager connection status.
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%prep
Mystro256 dbad489
%autosetup -n TLP-%{version}
Mystro256 dbad489
#This isn't necessary for fc18+, but it makes packaging easier:
Mystro256 dbad489
sed -i 's|= /lib/|= /usr/lib/|g' Makefile
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%build
alexjnewt@hotmail.com bfafd3d
make
alexjnewt@hotmail.com bfafd3d
alexjnewt@hotmail.com bfafd3d
%install
alexjnewt@hotmail.com bfafd3d
make install DESTDIR=%{buildroot} TLP_NO_INIT=1 \
Mystro256 dbad489
             TLP_NO_PMUTILS=1 TLP_WITH_SYSTEMD=1
alexjnewt@hotmail.com bfafd3d
#Install manpages:
Mystro256 dbad489
make install-man 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
alexjnewt@hotmail.com bfafd3d
%files
alexjnewt@hotmail.com bfafd3d
%config(noreplace) %{_sysconfdir}/default/tlp
alexjnewt@hotmail.com bfafd3d
%doc COPYING LICENSE README
alexjnewt@hotmail.com bfafd3d
%{_bindir}/*
alexjnewt@hotmail.com bfafd3d
%{_sbindir}/*
alexjnewt@hotmail.com bfafd3d
%{_mandir}/man*/*
Jeremy aae87d3
%{_datadir}/tlp-pm
Jeremy Newton bda8064
%{_udevrulesdir}/85-tlp.rules
alexjnewt@hotmail.com bfafd3d
%{_udevrulesdir}/../tlp-usb-udev
Mystro256 dbad489
%{_datadir}/bash-completion/completions/*
Jeremy Newton bda8064
%{_presetdir}/50-tlp.preset
alexjnewt@hotmail.com bfafd3d
%{_unitdir}/*.service
Jeremy aae87d3
alexjnewt@hotmail.com bfafd3d
%files rdw
alexjnewt@hotmail.com bfafd3d
%doc COPYING LICENSE README
alexjnewt@hotmail.com bfafd3d
%{_sysconfdir}/NetworkManager/dispatcher.d/99tlp-rdw-nm
Jeremy Newton 97ebcd6
%{_udevrulesdir}/85-tlp-rdw.rules
alexjnewt@hotmail.com bfafd3d
%{_udevrulesdir}/../tlp-rdw-udev
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 de5b2df
systemctl unmask systemd-rfkill.service
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
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