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