File fnfx.spec of Package fnfx
#
# spec file for package fnfx (Version 0.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fnfx
Url: http://fnfx.sourceforge.net
License: GPL v2 or later
Group: Hardware/Other
Provides: fnfxd
Conflicts: ial
Summary: Support for Function Key Combinations on Toshiba Laptops
Version: 0.3
Release: 120
ExclusiveArch: %ix86
Source: fnfx-%{version}.tar.gz
Source1: fnfxd.rc.suse
Source2: overview.html
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
PreReq: %fillup_prereq %insserv_prereq
%description
FnFX enables owners of Toshiba laptops to change the LCD brightness,
control, the internal fan, and use the special keys on their keyboard
(Fn-x combinations, hotkeys). The internal functions give the ability
to map the Fn keys to functions like volume up and down, mute, suspend
to disk, suspend to RAM, and switch LCD/CRT/TV-out. These functions
heavily depend on the system and kernel configuration.
Authors:
--------
Timo Hoenig <thoenig at nouse dot net>
%prep
%setup -n fnfx-%{version}
%build
# Update config.{guess,sub}
aclocal
automake -i
autoconf
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir}
make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
&& rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} libdir=%{_libdir} install
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
cp AUTHORS COPYING INSTALL ChangeLog NEWS README etc/fnfxrc_example $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
cp %{SOURCE2} $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
# install runlevel script
mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/fnfxd
ln -sf ../../etc/init.d/fnfxd ${RPM_BUILD_ROOT}/usr/sbin/rcfnfxd
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
&& rm -rf $RPM_BUILD_ROOT
%post
if hwinfo --bios |egrep 'Vendor.*TOSHIBA' &>/dev/null
then
%{insserv_force_if_yast fnfxd }
fi
%postun
%{insserv_cleanup}
%files
%defattr(-, root, root)
/etc/init.d/fnfxd
/usr/sbin/rcfnfxd
%{_sbindir}/fnfxd
%{_bindir}/fnfx
%dir %{_sysconfdir}/%{name}
%{_sysconfdir}/%{name}/*
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%changelog
* Thu Aug 28 2008 ro@suse.de
- fix init script
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Sep 29 2005 dmueller@suse.de
- add norootforbuild
* Wed Aug 10 2005 thoenig@suse.de
- added acpid to "Required-Start"
- removed loading of the Toshiba ACPI module from rc script. This
is now handled by acpid.
* Mon Jul 25 2005 thoenig@suse.de
- added "Conflicts: ial" since ial and fnfx use the same
kernel interface of the Toshiba ACPI driver which is a fifo.
* Thu Mar 03 2005 thoenig@suse.de
- added check to %%post whether package is being installed on a
machine with Toshiba BIOS: insserv is only executed if this
check is successful (closes #42495).
* Fri Nov 19 2004 thoenig@suse.de
- New upstream release: FnFX v0.3
* Wed Mar 31 2004 behlert@suse.de
- if /proc/acpi/toshiba/ is not available - skip start
* Wed Feb 25 2004 behlert@suse.de
- don't start fnfxd in init 1
* Mon Jan 26 2004 behlert@suse.de
- initial version