Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > by-pkgid > 42311d88508b8327de0f04ba0eab8577 > files > 10

toshutils-2.0.1-alt5.src.rpm

%def_enable pdfdocs
%define servicename fan

Name: toshutils
Version: 2.0.1
Release: alt5

Summary: Console utilities for Toshiba(tm) notebooks

License: GPL
Group: System/Configuration/Hardware
Url: http://www.buzzard.org.uk/toshiba

Packager: Vitaly Kuznetsov <vitty@altlinux.ru>

Source: %url/%name-%version.tar.bz2
Source1: %servicename.init
Patch0: %name-%version-alt-makefile-fixes.patch
Patch1: %name-%version-alt-man-fix.patch
Patch2: %name-%version-alt-dispswitch-gtk.patch
Patch3: %name-%version-pld-gtk+2.patch
Patch4: %name-%version-alt-gtk+2-btnsize.patch
Patch5: %name-%version-alt-static.patch
Patch6: %name-%version-asmio-alt.patch

BuildPreReq: flex libgtk+2-devel xpm-devel glibc-kernheaders libXext-devel

%if_enabled pdfdocs
BuildPreReq: tetex-latex
%endif

%description
This package contains console utilities for Toshiba(tm) notebooks
with native Toshiba(tm) BIOS:
  fan         - turn the cooling fan on/off
  svpw        - set the supervisor password
  tpasswd     - set the user password
  thotswap    - hotswap devices in the SelectBay
  tdocked     - determine docked status of laptop
  alarm       - select an alarm power on time
  tbacklight  - turn the backlight on/off
  ownerstring - change the ownerstring on the laptop
Note that these utilities may not work with ACPI enabled.

%package x11
Summary: X11 utilities for Toshiba(tm) notebooks
Group: System/Configuration/Hardware

# because of %_sysconfdir/modutils.d/%name
Requires: %name = %version-%release

%description x11
This package contains X11 utilities for Toshiba(tm) notebooks
with native Toshiba(tm) BIOS:
  dispswitch   - select internal/external/simultaneous video output on
                 Librettos
  hotkey       - report on Fn+F2/F3 and F4 changes
  wmtuxtime    - WindowMaker power save applet (can be run under
                 GNOME/KDE/...)
  tuxtime-conf - power saving, alarm power on and speaker volume settings
Note that these utilities may not work with ACPI enabled.

%if_enabled pdfdocs
%package docs
Summary: Docs about Toshiba(tm) notebooks configuration interfaces
Group: System/Configuration/Hardware

%description docs
This package contains technical documentation about System Configuration
Interface on Toshiba(tm) laptops. This interface is used in utilities from
toshutils and toshutils-x11.

Install this package if you are developing such utilities.

%endif #pdfdocs

%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
cp src/dispswitch.c src/dispswitch-gtk.c
%__aclocal
%__autoconf

%build
%configure
%make_build depend
%make_build

%if_enabled pdfdocs
%make_build doc -C doc
%endif

%install
mkdir -p %buildroot{%_bindir,%_sbindir,%_x11bindir}
%makeinstall DESTDIR=%buildroot
mv %buildroot%_bindir/{ownerstring,svpw,thotswap,tpasswd} %buildroot%_sbindir

mkdir -p %buildroot%_sysconfdir/modutils.d
echo 'alias char-major-10-181 toshiba' > %buildroot%_sysconfdir/modutils.d/%name

install -pD -m755 %SOURCE1 %buildroot%_initdir/%servicename

%post
%post_service %servicename
%preun
%preun_service %servicename
%files
%_sysconfdir/modutils.d/%name
%config %_initdir/fan
%_bindir/fan
%_bindir/tdocked
%_bindir/alarm
%_bindir/tbacklight
%_bindir/dispswitch
%_sbindir/*
%_mandir/man?/fan*
%_mandir/man?/svpw*
%_mandir/man?/tpasswd*
%_mandir/man?/thotswap*
%_mandir/man?/tdocked*
%_mandir/man?/alarm*
%_mandir/man?/tbacklight*
%_mandir/man?/ownerstring*
%_mandir/man?/dispswitch.*
%doc CONTRIBUTE ChangeLog FAQ README README.hotkey TODO src/fnfind contrib/

%files x11
%_bindir/dispswitch-gtk
%_bindir/hotkey
%_bindir/tuxtime-conf
%_x11bindir/wmtuxtime
%_mandir/man?/hotkey*
%_mandir/man?/wmtuxtime*
%_mandir/man?/tuxtime-conf*

%if_enabled pdfdocs
%files docs
%doc doc/*.pdf
%endif

%changelog
* Mon Nov 12 2007 Vitaly Kuznetsov <vitty@altlinux.ru> 2.0.1-alt5
- Fixes build (asm/io.h error)

* Thu Oct 11 2007 Vitaly Kuznetsov <vitty@altlinux.ru> 2.0.1-alt4
- Resurrected from orphaned
- build repaired

* Tue Jul 05 2005 Andrey Rahmatullin <wrar@altlinux.ru> 2.0.1-alt3
- fix building with make >= 3.81beta3-alt4

* Fri Sep 17 2004 Andrey Rahmatullin <wrar@altlinux.ru> 2.0.1-alt2
- dispswith now built with and without X support
- build X11 utilities with gtk2
- add explanation about (not) working with ACPI (#3992)
- add initscript for fan(1)
- spec fixes

* Sat Feb 12 2004 Andrey Rahmatullin <wrar@altlinux.ru> 2.0.1-alt1
- initial build