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