4 # /lib/udev/rules.d/40-tlp.rules
5 # /lib/udev/tlp-usb-udev
6 Summary: Power management tool for Linux
12 Source0: https://github.com/linrunner/TLP/archive/%{version}.tar.gz?/%{name}-%{version}.tar.gz
13 # Source0-md5: 910e2d16d669a782021c510952129505
14 Source1: %{name}.tmpfiles
15 URL: http://linrunner.de/en/tlp/tlp.html
21 Requires: wireless-tools
22 Suggests: bash-completion-%{name}
23 Suggests: smartmontools
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 TLP is a power management tool for Linux. It brings you the benefits
28 of advanced power management without the need to understand every
31 %package -n bash-completion-%{name}
32 Summary: bash-completion for tlp
33 Group: Applications/Shells
34 Requires: bash-completion
36 %description -n bash-completion-%{name}
37 This package provides bash-completion for tlp.
40 %setup -q -n TLP-%{version}
43 rm -rf $RPM_BUILD_ROOT
44 %{__make} install-tlp \
45 DESTDIR=$RPM_BUILD_ROOT \
46 SBIN=$RPM_BUILD_ROOT%{_sbindir} \
47 BIN=$RPM_BUILD_ROOT%{_bindir} \
48 PMETC=$RPM_BUILD_ROOT/etc/pm/power.d \
49 TLIB=$RPM_BUILD_ROOT%{_libdir}/tlp-pm \
50 PLIB=$RPM_BUILD_ROOT%{_libdir}/pm-utils \
51 ULIB=$RPM_BUILD_ROOT/lib/udev \
52 ACPI=$RPM_BUILD_ROOT/etc/acpi \
53 NMDSP=$RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d \
54 CONFFILE=$RPM_BUILD_ROOT/etc/default/tlp
56 install -d $RPM_BUILD_ROOT{%{_mandir}/{man1,man8},%{systemdtmpfilesdir},%{systemdunitdir},%{_varrun}/%{name}}
57 cp -p man/{bluetooth,run-on-ac,run-on-bat,wifi,wwan}.1 $RPM_BUILD_ROOT%{_mandir}/man1
58 cp -p man/{tlp,tlp-stat}.8 $RPM_BUILD_ROOT%{_mandir}/man8
60 cp -p tlp.service $RPM_BUILD_ROOT%{systemdunitdir}
61 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
64 rm -rf $RPM_BUILD_ROOT
67 %systemd_post tlp.service
70 %systemd_preun tlp.service
76 %defattr(644,root,root,755)
78 /etc/acpi/events/thinkpad-radiosw
79 %attr(755,root,root) /etc/acpi/thinkpad-radiosw.sh
80 %config(noreplace) %verify(not md5 mtime size) /etc/default/tlp
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/power.d/zztlp
98 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/49bay
99 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/49wwan
100 %dir %{_libdir}/tlp-pm
101 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-functions
102 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-nop
103 %attr(755,root,root) %{_libdir}/tlp-pm/tlp-rf-func
104 %attr(755,root,root) %{_libdir}/tlp-pm/tpacpi-bat
105 %{systemdtmpfilesdir}/%{name}.conf
106 %{systemdunitdir}/tlp.service
107 %dir %{_varrun}/%{name}
109 %files -n bash-completion-%{name}
110 %defattr(644,root,root,755)
111 /etc/bash_completion.d/*