%if "%{_target_cpu}" == "ppc" %define model powerbook %else %define model i386 %endif Name: pbbuttonsd Version: 0.8.1a Release: 3mamba Summary: PBButtons is a program suite to support special functions of laptops and notebooks Group: System/Servers Vendor: openmamba Distribution: openmamba Packager: Tiziana Ferro URL: http://pbbuttons.berlios.de/projects/pbbuttonsd/ Source: http://downloads.sourceforge.net/sourceforge/pbbuttons/pbbuttonsd-%{version}.tar.gz Source1: %{name}.init License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root %description PBButtons is a program suite to support laptop specific functions and make them available again under Linux. Basically it was developed to support the special hotkeys of an Apple iBook, Powerbook or TiBook but since version 0.5 the design has been changed to support all kind of laptops or notebooks. With this programms the keys for the display brightness, the volume of speaker and headphone, the mute key and the eject key will do their job as expected. The daemon also do some power management tasks including low battery warnings, dimming the display if idle, sleep on command, etc. The main part of PBButtons is the daemon pbbuttonsd which work as a server that do all the work. It runs in background and is preferable started at boot time. Multiple clients could register themselves to get messages about events from the server. The smallest client is pbbcmd which allows to change all of pbbuttonsd options at runtime from the command line. It could ask for the status of each option and could also change it. This client is now part of the pbbuttonsd package. %package devel Summary: Devel package for %{name} Group: Development/Libraries Requires: %{name} = %{?epoch:%epoch:}%{version} %description devel PBButtons is a program suite to support laptop specific functions and make them available again under Linux. Basically it was developed to support the special hotkeys of an Apple iBook, Powerbook or TiBook but since version 0.5 the design has been changed to support all kind of laptops or notebooks. With this programms the keys for the display brightness, the volume of speaker and headphone, the mute key and the eject key will do their job as expected. The daemon also do some power management tasks including low battery warnings, dimming the display if idle, sleep on command, etc. The main part of PBButtons is the daemon pbbuttonsd which work as a server that do all the work. It runs in background and is preferable started at boot time. Multiple clients could register themselves to get messages about events from the server. The smallest client is pbbcmd which allows to change all of pbbuttonsd options at runtime from the command line. It could ask for the status of each option and could also change it. This client is now part of the pbbuttonsd package. This package contains static libraries and header files need for development. %prep %setup -q %build %configure \ LAPTOP=%{model} %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install -D -m 755 %{S:1} \ %{buildroot}%{_initrddir}/%{name} %find_lang %{name} %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post # new install mv %{_sysconfdir}/%{name}.conf %{_sysconfdir}/%{name}.cnf if [ $1 -eq 1 ]; then /sbin/chkconfig --add %{name} service %{name} start fi : %preun # erase if [ $1 -eq 0 ]; then service %{name} stop /sbin/chkconfig --del %{name} fi : %postun # upgrade if [ $1 -eq 1 ]; then /sbin/chkconfig %{name} [ $? -eq 0 ] && service %{name} restart fi : %files -f %{name}.lang %defattr(-,root,root) %{_bindir}/pbbcmd %{_bindir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}.cnf %config(noreplace) %{_sysconfdir}/power/README %config(noreplace) %{_sysconfdir}/power/pmcs* %config(noreplace) %{_sysconfdir}/power/event.d/* %config(noreplace) %{_sysconfdir}/power/scripts.d/* %config(noreplace) %{_initrddir}/%{name} %dir %{_localstatedir}/lib/ibam %{_mandir}/man1/* %{_mandir}/man5/* %doc AUTHORS BUGS COPYING ChangeLog README TODO %files devel %defattr(-,root,root) %{_includedir}/*.h %{_libdir}/libpbb.a %changelog * Sun Dec 28 2014 Automatic Build System 0.8.1a-3mamba - automatic rebuild by autodist * Fri Feb 05 2010 Silvan Calarco 0.8.1a-2mamba - rebuilt to remove executable requirements * Tue May 13 2008 Tiziana Ferro 0.8.1a-1mamba - update to 0.8.1a * Wed May 17 2006 Stefano Cotta Ramusino 0.7.5-1qilnx - package created by autospec