Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37738433
en ru br
Репозитории ALT
5.1: 4.17-alt2
4.1: 4.17-alt2
4.0: 4.17-alt2
3.0: 4.17-alt1
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: tpctl

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%def_without M24

%if_with M24
%define _release alt1.M24.1
%else
%define _release alt2
%endif

Name: tpctl
Version: 4.17
Release: %_release
Packager: Grigory Batalov <bga at altlinux.ru>

Summary: Thinkpad Utilities
License: GPL
Group: System/Kernel and hardware
Url: http://tpctl.sourceforge.net/

ExclusiveArch: %ix86

Source: http://prdownloads.sourceforge.net/tpctl/%{name}_%version.tar.bz2
Source1: apmiser.init.bz2
Source2: hdparm-contrib-ultrabayd.tar.bz2
Source3: ultrabayd.init.bz2
Source4: http://samba.anu.edu.au/ftp/unpacked/junkcode/tphdisk.c.gz

Patch0: tpctl-4.10-alt-makefile.patch.gz
Patch1: hdparm-5.4-fix_path_bell_idectl.patch.bz2

Requires: lib%name = %version-%release
# 4.4-2mdk (Abel) idectl and ultrabayd is moved to this package
#Requires: hdparm >= 5.4-3mdk
#Conflicts: hdparm <= 5.4-2mdk

# Automatically added by buildreq on Mon Apr 04 2005

BuildRequires: libncurses-devel libtinfo-devel

%description
Utilities specific to IBM Thinkpads

%package -n lib%name
Summary: Library associated with tpctl, needed for tpctl utilities
Group: System/Libraries

%description -n lib%name
This library is mandatory for tpctl utilities.

%package -n lib%name-devel
Summary: Development package with headers
Group: Development/C
Requires: lib%name = %version-%release

%description -n lib%name-devel
This package contains header files for tpctl utilities.

%prep
%setup -q -a 2
%patch0 -p1
find . -type f -name Makefile -print0 | xargs -r0 %__subst 's,-lncurses,-lncurses -ltinfo,g'

# 4.4-2mdk (Abel) needs Source2

#%patch1 -p1 -b .ultrabay

# rename README

#%__mv contrib/README contrib/idectl-README
#%__mv apmiser/README apmiser/apmiser-README
%__mv tpctlir/README tpctlir/tpctlir-README

# unpack tphdisk

%__gzip -dc %SOURCE4 > tphdisk.c

%build
export CFLAGS="$RPM_OPT_FLAGS"
%make_build

# compile tphdisk

%__cc $RPM_OPT_FLAGS -o tphdisk tphdisk.c

# compile tpctlir

cd tpctlir
%make_build

%install
%__mkdir_p %buildroot%_sbindir
%make_install install DEST=%buildroot

#%__install -m 0644 -D man/apmiser.8 %buildroot%_man8dir/apmiser.8


# install tpctlir man page

%__install -m 0644 -D tpctlir/tpctlir.8 %buildroot%_man8dir/tpctlir.8

# install tphdisk binary

%__install -m 0755 -D tphdisk %buildroot%_sbindir/tphdisk

# install apmiser and ultrabayd initscripts

#%__mkdir_p %buildroot/%_initdir
#%__bzip2 -dc %SOURCE1 > %buildroot/%_initdir/apmiser
# 4.4-2mdk (Abel) ultrabayd stuff
#%__bzip2 -dc %SOURCE3 > %buildroot%_initdir/ultrabayd
#%__chmod 0755 %buildroot/%_initdir/*
#%__install -m 0755 contrib/idectl %buildroot%_sbindir/idectl
#%__install -m 0755 contrib/ultrabayd %buildroot%_sbindir/ultrabayd

# install headers

%__mkdir_p %buildroot/%_includedir
%__cp -r include %buildroot/%_includedir/%name

#%%post

#%%post_service apmiser
#%%post_service ultrabayd

#%%preun

#%%preun_service apmiser
#%%preun_service ultrabayd

%post -n lib%name -p %post_ldconfig

%postun -n lib%name -p %postun_ldconfig

%files
%_sbindir/tpctlir
%_sbindir/tphdisk
%_bindir/*
%_man1dir/*
%_man8dir/tpctlir.*
#%config(noreplace) %_initdir/*
%doc AUTHORS README SUPPORTED-MODELS TROUBLESHOOTING VGA-MODES ChangeLog
#%doc contrib/idectl-README apmiser/apmiser-README
%doc tpctlir/tpctlir-README

%files -n lib%name
%_libdir/lib*.so.*

%files -n lib%name-devel
%_libdir/lib*.so
%_includedir/*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin