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: 7542d9171b1fa42a0b69d258cf1c35e1
12 Source1: %{name}.tmpfiles
13 URL: http://linrunner.de/en/tlp/tlp.html
14 BuildRequires: rpmbuild(macros) >= 1.673
19 Requires: util-linux >= 2.31
20 Requires: wireless-tools
21 Suggests: bash-completion-%{name}
22 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 >= 2.0
37 %description -n bash-completion-%{name}
38 This package provides bash-completion for tlp.
41 %setup -q -n TLP-%{version}
44 rm -rf $RPM_BUILD_ROOT
45 %{__make} install-tlp \
46 DESTDIR=$RPM_BUILD_ROOT \
47 TLP_SBIN=%{_sbindir} \
49 TLP_FLIB=%{_datadir}/tlp/func.d \
50 TLP_TLIB=%{_datadir}/tlp \
52 TLP_NMDSP=/etc/NetworkManager/dispatcher.d \
53 TLP_SHCPL=%{bash_compdir}
55 install -d $RPM_BUILD_ROOT{%{_mandir}/{man1,man8},%{systemdtmpfilesdir},%{systemdunitdir},%{_varrun}/%{name}}
56 cp -p man/{bluetooth,run-on-ac,run-on-bat,wifi,wwan}.1 $RPM_BUILD_ROOT%{_mandir}/man1
57 cp -p man/{tlp,tlp-stat}.8 $RPM_BUILD_ROOT%{_mandir}/man8
59 cp -p tlp.service $RPM_BUILD_ROOT%{systemdunitdir}
60 cp -p %{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)
76 %doc AUTHORS changelog README.rst
77 %config(noreplace) %verify(not md5 mtime size) /etc/tlp.conf
79 %config(noreplace) %verify(not md5 mtime size) /etc/tlp.d/00-template.conf
81 /lib/udev/rules.d/85-tlp.rules
82 %attr(755,root,root) /lib/udev/tlp-usb-udev
83 %attr(755,root,root) %{_bindir}/bluetooth
84 %attr(755,root,root) %{_bindir}/nfc
85 %attr(755,root,root) %{_bindir}/run-on-ac
86 %attr(755,root,root) %{_bindir}/run-on-bat
87 %attr(755,root,root) %{_bindir}/tlp-stat
88 %attr(755,root,root) %{_bindir}/wifi
89 %attr(755,root,root) %{_bindir}/wwan
90 %attr(755,root,root) %{_sbindir}/tlp
91 %{_mandir}/man1/bluetooth.1*
92 %{_mandir}/man1/run-on-ac.1*
93 %{_mandir}/man1/run-on-bat.1*
94 %{_mandir}/man1/wifi.1*
95 %{_mandir}/man1/wwan.1*
96 %{_mandir}/man8/tlp.8*
97 %{_mandir}/man8/tlp-stat.8*
98 %{systemdtmpfilesdir}/%{name}.conf
99 %{systemdunitdir}/tlp.service
100 %attr(755,root,root) /lib/systemd/system-sleep/tlp
101 %dir /var/lib/%{name}
103 %{_datadir}/tlp/defaults.conf
104 %{_datadir}/tlp/deprecated.conf
105 %{_datadir}/tlp/rename.conf
106 %attr(755,root,root) %{_datadir}/tlp/tlp-func-base
107 %attr(755,root,root) %{_datadir}/tlp/tlp-pcilist
108 %attr(755,root,root) %{_datadir}/tlp/tlp-readconfs
109 %attr(755,root,root) %{_datadir}/tlp/tlp-usblist
110 %attr(755,root,root) %{_datadir}/tlp/tpacpi-bat
111 %{_datadir}/tlp/bat.d
112 %{_datadir}/tlp/func.d
113 %{_datadir}/metainfo/de.linrunner.tlp.metainfo.xml
115 %files -n bash-completion-%{name}
116 %defattr(644,root,root,755)
117 %{bash_compdir}/bluetooth
120 %{bash_compdir}/tlp-stat