%define name tpb %define version 0.6.3 %define release 1mdk Name: %{name} Summary: Program to use the IBM ThinkPad(tm) special keys Version: %{version} Release: %{release} License: GPL Group: Monitoring URL: http://www.nongnu.org/tpb/ Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.xinit Patch0: %{name}rc.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: xosd-devel >= 2.0 %description This program enables the IBM Thinkpad(tm) special keys. It is possible to bind a program to the ThinkPad button. It has a on-screen display (OSD) to show volume, mute and brightness of the LCD. %prep %setup -q %patch0 -p1 -b .orig %build %configure %make %install rm -rf $RPM_BUILD_ROOT %makeinstall mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/X11/xinit.d install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/X11/xinit.d/%{name} %find_lang %name %clean rm -rf $RPM_BUILD_ROOT %post modulesconf=/etc/modules.conf if ! `grep -q "/dev/nvram" $modulesconf` ; then echo "adding entries for /dev/nvram to your $modulesconf" cat >> $modulesconf << EOF # nvram for tpb alias /dev/misc/nvram nvram alias /dev/nvram /dev/misc/nvram EOF fi consoleperms=/etc/security/console.perms if ! `grep -q "/dev/nvram" $consoleperms` ; then echo "adding entry for /dev/nvram to your $consoleperms" cat >> $consoleperms << EOF # allow user access to nvram for tpb <console> 0600 /dev/nvram 0600 root EOF fi %files -f %name.lang %defattr(-,root,root) %doc COPYING README CREDITS ChangeLog doc/callback_example.sh %{_bindir}/* %config(noreplace) %{_sysconfdir}/X11/xinit.d/tpb %defattr(0644,root,root,0755) %config(noreplace) %{_sysconfdir}/tpbrc %{_mandir}/man1/* %changelog * Mon Aug 23 2004 Buchan Milne <bgmilne@linux-mandrake.com> 0.6.3-1mdk - 0.6.3 - update patch * Wed Mar 24 2004 Buchan Milne <bgmilne@linux-mandrake.com> 0.6.0-2mdk - increase polltime to reduce CPU usage under 2.6 kernels (#9193) (thanks to Michael Reinsch) * Sun Dec 14 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.6.0-1mdk - 0.6.0 - fix buildrequires (lib64..) * Mon Jun 30 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.5.1-1mdk - 0.5.1 * Wed Feb 19 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.4.2-2mdk - from Michael Reinsch <mr@uue.org> : - add nvram entry to console.perms if required - launch it from xinit.d - provide a nicer default config * Tue Feb 18 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.4.2-1mdk - from Michael Reinsch <mr@uue.org> : - add nvram entries to modules.conf if required - first mandrake spec file