1 Summary: Power management tool for Linux
7 Source0: https://github.com/linrunner/TLP/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz
8 # Source0-md5: 910e2d16d669a782021c510952129505
9 Source1: %{name}.tmpfiles
10 URL: http://linrunner.de/en/tlp/tlp.html
16 Requires: wireless-tools
17 Suggests: bash-completion-%{name}
18 Suggests: smartmontools
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 TLP is a power management tool for Linux. It brings you the benefits
23 of advanced power management without the need to understand every
26 %package -n bash-completion-%{name}
27 Summary: bash-completion for tlp
28 Group: Applications/Shells
29 Requires: bash-completion
31 %description -n bash-completion-%{name}
32 This package provides bash-completion for tlp.
35 %setup -q -n TLP-%{version}
38 rm -rf $RPM_BUILD_ROOT
40 %{__make} install-tlp \
41 DESTDIR=$RPM_BUILD_ROOT \
42 SBIN=$RPM_BUILD_ROOT%{_sbindir} \
43 BIN=$RPM_BUILD_ROOT%{_bindir} \
44 PMETC=$RPM_BUILD_ROOT%{_sysconfdir}/pm/power.d \
45 TLIB=$RPM_BUILD_ROOT%{_libdir}/tlp-pm \
46 PLIB=$RPM_BUILD_ROOT%{_libdir}/pm-utils \
47 ULIB=$RPM_BUILD_ROOT%/lib/udev \
48 ACPI=$RPM_BUILD_ROOT%{_sysconfdir}/acpi \
49 NMDSP=$RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d \
50 CONFFILE=$RPM_BUILD_ROOT%{_sysconfdir}/default/tlp
52 install -d $RPM_BUILD_ROOT%{_mandir}/{man1,man8} $RPM_BUILD_ROOT%{systemdtmpfilesdir} \
53 $RPM_BUILD_ROOT%{systemdunitdir} $RPM_BUILD_ROOT%{_varrun}/%{name}
54 install man/bluetooth.1 man/run-on-ac.1 man/run-on-bat.1 man/wifi.1 \
55 man/wwan.1 $RPM_BUILD_ROOT%{_mandir}/man1
56 install man/tlp.8 man/tlp-stat.8 $RPM_BUILD_ROOT%{_mandir}/man8
58 install tlp.service $RPM_BUILD_ROOT%{systemdunitdir}
60 install %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
63 rm -rf $RPM_BUILD_ROOT
66 %systemd_post tlp.service
69 %systemd_preun tlp.service
75 %defattr(644,root,root,755)
77 %dir %{_libdir}/tlp-pm
78 %dir %{_varrun}/%{name}
79 %attr(755,root,root) %{_bindir}/bluetooth
80 %attr(755,root,root) %{_bindir}/run-on-ac
81 %attr(755,root,root) %{_bindir}/run-on-bat
82 %attr(755,root,root) %{_bindir}/tlp-pcilist
83 %attr(755,root,root) %{_bindir}/tlp-stat
84 %attr(755,root,root) %{_bindir}/tlp-usblist
85 %attr(755,root,root) %{_bindir}/wifi
86 %attr(755,root,root) %{_bindir}/wwan
87 %{_sysconfdir}/acpi/events/thinkpad-radiosw
88 %{_sysconfdir}/acpi/thinkpad-radiosw.sh
89 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/tlp
90 %{systemdtmpfilesdir}/%{name}.conf
91 %{systemdunitdir}/tlp.service
92 %attr(755,root,root) %{_libdir}/pm-utils/power.d/zztlp
93 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/49bay
94 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/49wwan
95 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-functions
96 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-nop
97 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-rf-func
98 %attr(755,root,root) %{_libdir}/tlp-pm/tpacpi-bat
99 %{_mandir}/man1/bluetooth.1*
100 %{_mandir}/man1/run-on-ac.1*
101 %{_mandir}/man1/run-on-bat.1*
102 %{_mandir}/man1/wifi.1*
103 %{_mandir}/man1/wwan.1*
104 %{_mandir}/man8/tlp.8*
105 %{_mandir}/man8/tlp-stat.8*
106 %attr(755,root,root) %{_sbindir}/tlp
108 %files -n bash-completion-%{name}
109 %defattr(644,root,root,755)
110 /etc/bash_completion.d/*