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