# Taken from SUSE and initially modified for Mandriva by Sherwin # Daganato: thanks Summary: Apple laptops hotkeys event handler Name: pommed Version: 1.31 Release: %mkrel 1 License: GPLv2 Group: System/Kernel and hardware URL: http://technologeek.org/projects/pommed/ Source0: %{name}-%{version}.tar.gz Source1: %{name}.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: eject BuildRequires: libalsa-devel BuildRequires: libaudiofile-devel BuildRequires: dbus-devel BuildRequires: gtk+2-devel BuildRequires: confuse-devel BuildRequires: libglade2-devel BuildRequires: libsmbios-devel BuildRequires: pciutils-devel BuildRequires: libx11-devel BuildRequires: libxext-devel BuildRequires: desktop-file-utils BuildRequires: xpm-devel BuildRequires: dbus-glib-devel %description pommed handles the hotkeys found on the Apple MacBook Pro, MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, keyboard backlight or ejects the CD-ROM drive accordingly. pommed also monitors the ambient light sensors to automatically light up the keyboard backlight on the MacBook Pro and PowerBook. Optional support for the Apple Remote control is available. %package -n gpomme Summary: graphical client for pommed Group: System/Kernel and hardware Requires: pommed Requires: dbus %description -n gpomme pommed handles the hotkeys found on the Apple MacBook Pro, MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, keyboard backlight or ejects the CD-ROM drive accordingly. gpomme is a graphical client for pommed. It listens for signals sent by pommed on DBus and displays the action taken by pommed along with the current state associated to this action. %package -n wmpomme Summary: WindowMaker dockapp client for pommed Group: System/Kernel and hardware Requires: pommed Requires: dbus %description -n wmpomme pommed handles the hotkeys found on the Apple MacBook Pro, MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, keyboard backlight or ejects the CD-ROM drive accordingly. wmpomme is a dockapp client for pommed. It displays the current level of each item controlled by pommed. %prep %setup -q sed -i -e "s/CFLAGS = -g -O2 /CFLAGS += /" -e "s/LDFLAGS =/LDFLAGS +=/" */Makefile %build perl -pi -e 's,/usr/lib,%{_libdir},g' pommed/Makefile CFLAGS="%{optflags}" %make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d mkdir -p %{buildroot}%{_initrddir} mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,22x22,24x24,32x32,48x48,64x64,72x72,96x96,128x128,scalable}/apps mkdir -p %{buildroot}%{_datadir}/gpomme mkdir -p %{buildroot}%{_datadir}/locale mkdir -p %{buildroot}%{_mandir}/man1 install -m 755 pommed/pommed %{buildroot}%{_sbindir} %ifarch ppc ppc64 install -m 644 pommed.conf.pmac %{buildroot}%{_sysconfdir}/pommed.conf %else install -m 644 pommed.conf.mactel %{buildroot}%{_sysconfdir}/pommed.conf %endif install -m 644 dbus-policy.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/pommed.conf install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pommed install -m 644 pommed.1 %{buildroot}%{_mandir}/man1 # gpomme install -m 755 gpomme/gpomme %{buildroot}%{_bindir} install -m 644 gpomme/gpomme.1 %{buildroot}%{_mandir}/man1 install -m 644 gpomme/*.desktop %{buildroot}%{_datadir}/applications for i in {16x16,22x22,24x24,32x32,48x48,64x64,72x72,96x96,128x128}; \ do install -m 644 icons/gpomme_$i.png %{buildroot}%{_iconsdir}/hicolor/$i/apps/gpomme.png; done install -m 644 icons/gpomme.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/gpomme.svg install -m 644 gpomme/gpomme.glade %{buildroot}%{_datadir}/gpomme cp -a gpomme/themes %{buildroot}%{_datadir}/gpomme rm -rfv %{buildroot}%{_datadir}/gpomme/themes/src for mo in gpomme/po/*.mo ; do lang=`basename $mo .mo` mkdir -p %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES install -m 644 $mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/gpomme.mo done # wmpomme install -m 755 wmpomme/wmpomme %{buildroot}%{_bindir} install -m 644 wmpomme/wmpomme.1 %{buildroot}%{_mandir}/man1 install -m 644 icons/gpomme_32x32.xpm %{buildroot}%{_iconsdir}/wmpomme.xpm desktop-file-install --vendor="" \ --remove-category="Utility" \ --add-category="GTK" \ --add-category="System" \ --add-category="Monitor" \ --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* %find_lang gpomme %if %mdkversion < 200900 %post -n gpomme %{update_menus} %{update_icon_cache hicolor} %endif %if %mdkversion < 200900 %postun -n gpomme %{clean_menus} %{clean_icon_cache hicolor} %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS README TODO %config(noreplace) /etc/pommed.conf %config(noreplace) /etc/dbus-1/system.d/pommed.conf %{_initrddir}/pommed %{_sbindir}/pommed %{_mandir}/man1/po* %files -n gpomme -f gpomme.lang %defattr(-,root,root) %{_bindir}/gpomme %{_datadir}/applications/*.desktop %{_iconsdir}/hicolor/*/apps/* %{_datadir}/gpomme %{_mandir}/man1/gpo* %files -n wmpomme %defattr(-,root,root) %{_bindir}/wmpomme %{_iconsdir}/wmpomme.xpm %{_mandir}/man1/wmpo* %changelog * Mon Mar 15 2010 Rémy Clouard <shikamaru@mandriva.org> 1.31-1mdv2010.1 + Revision: 520322 - bump release * Sun Sep 13 2009 Frederik Himpe <fhimpe@mandriva.org> 1.28-1mdv2010.0 + Revision: 439017 - Update to new version 1.28 * Sat Aug 01 2009 Frederik Himpe <fhimpe@mandriva.org> 1.27-1mdv2010.0 + Revision: 407072 - Update to new version 1.27 * Sat Mar 14 2009 Frederik Himpe <fhimpe@mandriva.org> 1.26-1mdv2009.1 + Revision: 355054 - Update to new version 1.26 - Use Mandriva CFLAGS and prepare to use LDFLAGS, but don't enable the latter for now because it breaks build * Sun Jan 04 2009 Jérôme Soyer <saispo@mandriva.org> 1.25-1mdv2009.1 + Revision: 324412 - New upstream release * Sat Jan 03 2009 Jérôme Soyer <saispo@mandriva.org> 1.24-1mdv2009.1 + Revision: 323998 - Add BuildRequires - New upstream release * Fri Aug 08 2008 Thierry Vignaud <tv@mandriva.org> 1.18-2mdv2009.0 + Revision: 269009 - rebuild early 2009.0 package (before pixel changes) + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas * Mon May 19 2008 Frederik Himpe <fhimpe@mandriva.org> 1.18-1mdv2009.0 + Revision: 209224 - New version - Respect CLFAGS (cflags.patch) - Add some LSB headers to init script * Wed Feb 13 2008 Adam Williamson <awilliamson@mandriva.org> 1.14-2mdv2008.1 + Revision: 166877 - oops, missed the -n - %%post and %%postun should be for gpomme, not pommed, as that's where the menu and icons are + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Wed Dec 12 2007 Jérôme Soyer <saispo@mandriva.org> 1.14-1mdv2008.1 + Revision: 117856 - New release 1.14 * Thu Nov 29 2007 Adam Williamson <awilliamson@mandriva.org> 1.12-1mdv2008.1 + Revision: 113843 - fix groups for sub-packages - oops, typo in the perl-o - fix a hardcoded /usr/lib in the pommed Makefile - buildrequires desktop-file-utils - import pommed