]> git.pld-linux.org Git - SPECS.git/blob - powersave.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / powersave.spec
1 # TODO:
2 # - fix bashizms in po/Makefile.am
3 # - do something with contrib scripts
4 #
5 Summary:        Powermanagment daemon
6 Summary(pl.UTF-8):      Demon zarządzania energią
7 Name:           powersave
8 Version:        0.15.20
9 Release:        2
10 License:        GPL
11 Group:          Daemons
12 Source0:        http://downloads.sourceforge.net/powersave/%{name}-%{version}.tar.bz2
13 # Source0-md5:  8c14df7f3e477ac8c1d5b955f01dcfe6
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Source3:        %{name}.logrotate
17 Patch0:         %{name}-ipw2200.patch
18 Patch1:         %{name}-lib.patch
19 Patch2:         xorg-paths.patch
20 URL:            http://powersave.sourceforge.net/powersave/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  cpufrequtils-devel >= 0.4
24 BuildRequires:  dbus-glib-devel >= 0.71
25 BuildRequires:  hal-devel >= 0.5.7.1
26 BuildRequires:  liblazy-devel
27 BuildRequires:  libtool
28 BuildRequires:  pkgconfig
29 BuildRequires:  rpmbuild(macros) >= 1.228
30 BuildRequires:  sed >= 4.0
31 BuildRequires:  sysfsutils-devel >= 1.3.0-3
32 Requires(post,preun):   /sbin/chkconfig
33 Requires:       %{name}-libs = %{version}-%{release}
34 Requires:       acpid
35 Requires:       hal >= 0.5.7.1
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 The powersave package provides global power management tasks. It
40 supports battery monitoring, userspace workarounds for proper
41 suspend/standby functionality and more.
42
43 %description -l pl.UTF-8
44 Paczka powersave świadczy globalne usługi zarządzania energią. Wspiera
45 monitorowanie stanu baterii, prowizorycznie rozwiązuje problemy
46 usypiania/wstrzymywania w przestrzeni użytkownika i inne.
47
48 %package libs
49 Summary:        Powersave libraries
50 Summary(pl.UTF-8):      Biblioteki powersave
51 Group:          Libraries
52
53 %description libs
54 Powersave libraries.
55
56 %description libs -l pl.UTF-8
57 Biblioteki powersave.
58
59 %package devel
60 Summary:        Header files for powersave library
61 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki powersave
62 Group:          Development/Libraries
63 Requires:       %{name}-libs = %{version}-%{release}
64 Requires:       cpufrequtils-devel >= 0.4
65 Requires:       dbus-devel >= 0.71
66 Requires:       hal-devel >= 0.5.7.1
67 Requires:       sysfsutils-devel >= 1.3.0-3
68
69 %description devel
70 This is the package containing header files for powersave libraries.
71
72 %description devel -l pl.UTF-8
73 Paczka ta zawiera pliki nagłówkowe dla bibliotek powersave.
74
75 %package static
76 Summary:        Static powersave libraries
77 Summary(pl.UTF-8):      Biblioteki statyczne powersave
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static powersave library.
83
84 %description static -l pl.UTF-8
85 Statyczne biblioteki powersave.
86
87 %prep
88 %setup -q
89 #%patch0 -p1
90 %patch1 -p1
91 %patch2 -p1
92 # translations disabled (terrible mess, see TODO)
93 sed -i -e 's|translations||' Makefile.am
94
95 %build
96 %{__libtoolize}
97 %{__aclocal}
98 %{__autoconf}
99 %{__autoheader}
100 %{__automake}
101 %configure \
102         --with-gnome-bindir=%{_prefix} \
103         --with-kde-bindir=%{_prefix}
104 %{__make}
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
109         $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
110
111 %{__make} install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/powersave
115 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/powersaved
116 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/powersave
117
118 rm -rf $RPM_BUILD_ROOT/etc/init.d
119 rm $RPM_BUILD_ROOT{%{_libdir}/powersave/rcpowersaved,%{_sbindir}/rcpowersaved}
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post
125 /sbin/chkconfig --add %{name}
126 %service %{name} restart
127
128 %preun
129 if [ "$1" = "0" ]; then
130         %service -q %{name} stop
131         /sbin/chkconfig --del %{name}
132 fi
133
134 %post   libs -p /sbin/ldconfig
135 %postun libs -p /sbin/ldconfig
136
137 %files
138 %defattr(644,root,root,755)
139 %doc README docs/README.*
140
141 %dir %{_sysconfdir}/powersave
142 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powersave/*
143 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/powersaved
144 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/powersave.conf
145
146 %dir %{_sysconfdir}/acpi/events.ignore
147 %{_sysconfdir}/acpi/events.ignore/events.ignore
148
149 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/powersave
150 %attr(754,root,root) /etc/rc.d/init.d/powersave
151
152 %attr(755,root,root) %{_bindir}/*
153 %attr(755,root,root) %{_sbindir}/powersaved
154 %dir %{_libdir}/powersave
155 %dir %{_libdir}/powersave/scripts
156 %attr(755,root,root) %{_libdir}/powersave/do_*
157 %attr(755,root,root) %{_libdir}/powersave/myecho
158 %attr(755,root,root) %{_libdir}/powersave/powersave-notify
159 %attr(755,root,root) %{_libdir}/powersave/scripts/*
160 %attr(755,root,root) %{_libdir}/powersave/setDefaultTrippoints.sh
161 %attr(755,root,root) %{_libdir}/powersave/wttyhx
162 %{_mandir}/man8/powersave*.8*
163
164 %files libs
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/*.so.*.*.*
167
168 %files devel
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/*.so
171 %{_libdir}/*.la
172 %{_includedir}/*.h
173 %{_pkgconfigdir}/*.pc
174
175 %files static
176 %defattr(644,root,root,755)
177 %{_libdir}/*.a
This page took 0.064877 seconds and 3 git commands to generate.