]> git.pld-linux.org Git - packages/tlp.git/blob - tlp.spec
- up to 0.3.9
[packages/tlp.git] / tlp.spec
1 Summary:        Power management tool for Linux
2 Name:           tlp
3 Version:        0.3.9
4 Release:        1
5 License:        GPL v2
6 Group:          Base
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
11 Requires:       acpid
12 Requires:       ethtool
13 Requires:       hdparm
14 Requires:       pm-utils
15 Requires:       rfkill
16 Requires:       wireless-tools
17 Suggests:       bash-completion-%{name}
18 Suggests:       smartmontools
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
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
24 technical detail.
25
26 %package -n bash-completion-%{name}
27 Summary:        bash-completion for tlp
28 Group:          Applications/Shells
29 Requires:       bash-completion
30
31 %description -n bash-completion-%{name}
32 This package provides bash-completion for tlp.
33
34 %prep
35 %setup -q -n TLP-%{version}
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39
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
51
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
57
58 install tlp.service $RPM_BUILD_ROOT%{systemdunitdir}
59
60 install %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 %systemd_post tlp.service
67
68 %preun
69 %systemd_preun tlp.service
70
71 %postun
72 %systemd_reload
73
74 %files
75 %defattr(644,root,root,755)
76 %doc README
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
107
108 %files -n bash-completion-%{name}
109 %defattr(644,root,root,755)
110 /etc/bash_completion.d/*
This page took 0.084027 seconds and 3 git commands to generate.