2 # - fix bashizms in po/Makefile.am
3 # - do something with contrib scripts
5 Summary: Powermanagment daemon
6 Summary(pl.UTF-8): Demon zarządzania energią
12 Source0: http://downloads.sourceforge.net/powersave/%{name}-%{version}.tar.bz2
13 # Source0-md5: 8c14df7f3e477ac8c1d5b955f01dcfe6
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}
35 Requires: hal >= 0.5.7.1
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 The powersave package provides global power management tasks. It
40 supports battery monitoring, userspace workarounds for proper
41 suspend/standby functionality and more.
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.
49 Summary: Powersave libraries
50 Summary(pl.UTF-8): Biblioteki powersave
56 %description libs -l pl.UTF-8
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
70 This is the package containing header files for powersave libraries.
72 %description devel -l pl.UTF-8
73 Paczka ta zawiera pliki nagłówkowe dla bibliotek powersave.
76 Summary: Static powersave libraries
77 Summary(pl.UTF-8): Biblioteki statyczne powersave
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{version}-%{release}
82 Static powersave library.
84 %description static -l pl.UTF-8
85 Statyczne biblioteki powersave.
92 # translations disabled (terrible mess, see TODO)
93 sed -i -e 's|translations||' Makefile.am
102 --with-gnome-bindir=%{_prefix} \
103 --with-kde-bindir=%{_prefix}
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
112 DESTDIR=$RPM_BUILD_ROOT
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
118 rm -rf $RPM_BUILD_ROOT/etc/init.d
119 rm $RPM_BUILD_ROOT{%{_libdir}/powersave/rcpowersaved,%{_sbindir}/rcpowersaved}
122 rm -rf $RPM_BUILD_ROOT
125 /sbin/chkconfig --add %{name}
126 %service %{name} restart
129 if [ "$1" = "0" ]; then
130 %service -q %{name} stop
131 /sbin/chkconfig --del %{name}
134 %post libs -p /sbin/ldconfig
135 %postun libs -p /sbin/ldconfig
138 %defattr(644,root,root,755)
139 %doc README docs/README.*
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
146 %dir %{_sysconfdir}/acpi/events.ignore
147 %{_sysconfdir}/acpi/events.ignore/events.ignore
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
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*
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/*.so.*.*.*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/*.so
173 %{_pkgconfigdir}/*.pc
176 %defattr(644,root,root,755)