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