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