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