]> git.pld-linux.org Git - packages/tlp.git/blob - tlp.spec
d24716478e808441e6fb61f6e2f748bebb4e66cb
[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:        1.6.0
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:  7542d9171b1fa42a0b69d258cf1c35e1
12 Source1:        %{name}.tmpfiles
13 URL:            http://linrunner.de/en/tlp/tlp.html
14 BuildRequires:  rpmbuild(macros) >= 1.673
15 Requires:       acpid
16 Requires:       ethtool
17 Requires:       hdparm
18 Requires:       pm-utils
19 Requires:       util-linux >= 2.31
20 Requires:       wireless-tools
21 Suggests:       bash-completion-%{name}
22 Suggests:       smartmontools
23 BuildArch:      noarch
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 >= 2.0
35 BuildArch:      noarch
36
37 %description -n bash-completion-%{name}
38 This package provides bash-completion for tlp.
39
40 %prep
41 %setup -q -n TLP-%{version}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 %{__make} install-tlp \
46         DESTDIR=$RPM_BUILD_ROOT \
47         TLP_SBIN=%{_sbindir} \
48         TLP_BIN=%{_bindir} \
49         TLP_FLIB=%{_datadir}/tlp/func.d \
50         TLP_TLIB=%{_datadir}/tlp \
51         TLP_ULIB=/lib/udev \
52         TLP_NMDSP=/etc/NetworkManager/dispatcher.d \
53         TLP_SHCPL=%{bash_compdir}
54
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
58
59 cp -p tlp.service $RPM_BUILD_ROOT%{systemdunitdir}
60 cp -p %{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 AUTHORS changelog README.rst
77 %config(noreplace) %verify(not md5 mtime size) /etc/tlp.conf
78 %dir /etc/tlp.d
79 %config(noreplace) %verify(not md5 mtime size) /etc/tlp.d/00-template.conf
80 /etc/tlp.d/README
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}
102 %dir %{_datadir}/tlp
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
114
115 %files -n bash-completion-%{name}
116 %defattr(644,root,root,755)
117 %{bash_compdir}/bluetooth
118 %{bash_compdir}/nfc
119 %{bash_compdir}/tlp
120 %{bash_compdir}/tlp-stat
121 %{bash_compdir}/wifi
122 %{bash_compdir}/wwan
This page took 0.063274 seconds and 2 git commands to generate.