]> git.pld-linux.org Git - packages/laptop-mode-tools.git/blob - laptop-mode-tools.spec
- updated to 1.49
[packages/laptop-mode-tools.git] / laptop-mode-tools.spec
1 #
2 # TODO:
3 # - subpackage with files for pbbuttonsd and pmud
4 # - fix *.conf manuals (should be .5 and referenced as such)
5 #
6 Summary:        Laptop Mode Tools
7 Summary(pl.UTF-8):      Narzędzia do trybu laptopowego
8 Name:           laptop-mode-tools
9 Version:        1.49
10 Release:        1
11 License:        GPL
12 Group:          Applications/System
13 Source0:        http://samwel.tk/laptop_mode/tools/downloads/%{name}_%{version}.tar.gz
14 # Source0-md5:  48615d47679869226c88161d1b4e7a55
15 Source1:        %{name}.init
16 URL:            http://www.samwel.tk/laptop_mode/
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires(post,preun):   /sbin/chkconfig
19 %ifarch %{ix86} %{x8664} arm ia64 mips ppc sh
20 Requires:       %{name}-scripts = %{epoch}:%{version}-%{release}
21 %endif
22 Suggests:       hdparm
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Laptop mode (also known as laptopmode, laptop-mode and laptop_mode,
27 for search engine purposes :) ) is a kernel "mode" that allows you to
28 extend the battery life of your laptop. It does this by intelligently
29 grouping write activity on your disks, so that only reads of uncached
30 data result in a disk spinup. It causes a significant improvement in
31 battery life (for usage patterns that allow it).
32
33 %description -l pl.UTF-8
34 Tryb laptopowy (laptop mode) to "tryb" pracy jądra umożliwiający
35 wydłużenie czasu życia baterii laptopa. Czyni to inteligentnie
36 grupując zapisy na dyski w ten sposób, że tylko odczyt
37 niezbuforowanych danych powoduje rozpędzenie dysku. Powoduje znaczącą
38 poprawę czasu życia baterii.
39
40 %package acpi
41 Summary:        ACPI scripts for laptop mode tools
42 Summary(pl.UTF-8):      Skrypty ACPI dla narzędzi do trybu laptopowego
43 Group:          Applications/System
44 Requires:       %{name} = %{epoch}:%{version}-%{release}
45 Requires:       acpid
46 Provides:       %{name}-scripts = %{epoch}:%{version}-%{release}
47
48 %description acpi
49 ACPI scripts for laptop mode tools.
50
51 %description acpi -l pl.UTF-8
52 Skrypty ACPI dla narzędzi do trybu laptopowego.
53
54 %package apm
55 Summary:        APM scripts for laptop mode tools
56 Summary(pl.UTF-8):      Skrypty APM dla narzędzi do trybu laptopowego
57 Group:          Applications/System
58 Requires:       %{name} = %{epoch}:%{version}-%{release}
59 Requires:       apmd
60 Provides:       %{name}-scripts = %{epoch}:%{version}-%{release}
61
62 %description apm
63 APM scripts for laptop mode tools.
64
65 %description apm -l pl.UTF-8
66 Skrypty APM dla narzędzi do trybu laptopowego.
67
68 %prep
69 %setup -q -n %{name}_%{version}
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,apm/event.d,acpi/{actions,events}} \
74         $RPM_BUILD_ROOT{%{_mandir}/man8,%{_datadir}/%{name}/modules,%{_sbindir}} \
75         $RPM_BUILD_ROOT/etc/laptop-mode/{{batt,lm-ac,nolm-ac}-{start,stop},conf.d} \
76         $RPM_BUILD_ROOT%{_varrun}/%{name}
77
78 install man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
79
80 install etc/laptop-mode/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/laptop-mode
81 install etc/laptop-mode/conf.d/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/laptop-mode/conf.d
82 install usr/share/laptop-mode-tools/modules/* $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
83 install usr/sbin/{laptop_mode,lm-syslog-setup,lm-profiler} $RPM_BUILD_ROOT%{_sbindir}
84
85 %ifarch %{ix86} %{x8664} ia64
86 install etc/acpi/actions/* $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions
87 install etc/acpi/events/* $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
88 %endif
89
90 %ifarch %{ix86} arm mips ppc sh
91 install etc/apm/event.d/* $RPM_BUILD_ROOT%{_sysconfdir}/apm/event.d
92 %endif
93
94 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/laptop-mode
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 /sbin/chkconfig --add laptop-mode
101 %service laptop-mode restart
102
103 %preun
104 if [ "$1" = "0" ]; then
105         %service laptop-mode stop
106         /sbin/chkconfig --del laptop-mode
107 fi
108
109 %files
110 %defattr(644,root,root,755)
111 %doc README Documentation/*
112 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/laptop-mode/*.conf
113 %dir %{_sysconfdir}/laptop-mode
114 %dir %{_sysconfdir}/laptop-mode/batt-start
115 %dir %{_sysconfdir}/laptop-mode/batt-stop
116 %dir %{_sysconfdir}/laptop-mode/conf.d
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/laptop-mode/conf.d/*.conf
118 %dir %{_sysconfdir}/laptop-mode/lm-ac-start
119 %dir %{_sysconfdir}/laptop-mode/lm-ac-stop
120 %dir %{_sysconfdir}/laptop-mode/nolm-ac-start
121 %dir %{_sysconfdir}/laptop-mode/nolm-ac-stop
122 %attr(754,root,root) /etc/rc.d/init.d/laptop-mode
123 %dir %{_datadir}/%{name}
124 %dir %{_datadir}/%{name}/modules
125 %dir %{_varrun}/%{name}
126 %attr(755,root,root) %{_datadir}/%{name}/modules/*
127 %attr(755,root,root) %{_sbindir}/laptop_mode
128 %attr(755,root,root) %{_sbindir}/lm-profiler
129 %attr(755,root,root) %{_sbindir}/lm-syslog-setup
130 %{_mandir}/man8/laptop_mode.8*
131 %{_mandir}/man8/lm-profiler.8*
132 %{_mandir}/man8/lm-syslog-setup.8*
133 # should be man5
134 %{_mandir}/man8/laptop-mode.conf.8*
135 %{_mandir}/man8/lm-profiler.conf.8*
136
137 %ifarch %{ix86} %{x8664} ia64
138 %files acpi
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_sysconfdir}/acpi/actions/lm_*.sh
141 %{_sysconfdir}/acpi/events/lm_*
142 %endif
143
144 %ifarch %{ix86} arm mips ppc sh
145 %files apm
146 %defattr(644,root,root,755)
147 # dir not owned
148 %attr(755,root,root) %{_sysconfdir}/apm/event.d/laptop-mode
149 %endif
This page took 0.095838 seconds and 4 git commands to generate.