Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37870392
en ru br
ALT Linux repos
5.0: 2.0.1-alt6
4.1: 2.0.1-alt5
3.0: 2.0.1-alt3

Group :: System/Configuration/Hardware
RPM: toshutils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_enable pdfdocs
%define servicename fan

Name: toshutils
Version: 2.0.1
Release: alt6

Exclusivearch: %ix86 x86_64

Summary: Console utilities for Toshiba(tm) notebooks

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

Packager: Vitaly Kuznetsov <vitty at 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

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin