Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1559920
 поиск   регистрация   авторизация 
 
Группа :: Система/Ядро и оборудование
Пакет: hibernate

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

%define nuserui suspend2-userui-0.6.2

Name: hibernate
Version: 1.12
Release: alt11.M24.1

Summary: Software suspend 2 hibernate script
License: GPL
Group: System/Kernel and hardware
URL: http://suspend2.net/
Packager: Alex Yustasov <yust at altlinux.ru>

Obsoletes: suspend

Source0: hibernate-script-%version.tar.gz
Source1: %nuserui.tar.gz
Source2: hibernate-cleanup

Patch0: %name-alt-kernel-fix.patch
Patch1: %name-alt-blacklist.patch
Patch2: %name-xhacks.patch
Patch3: %name-alt-default-fix.patch
Patch4: %name-add_rcval_cleanup.patch
Patch5: userui-remove-fbsplash.patch
#Patch6: %name-alt-chvt.patch

BuildPreReq: glibc-devel-static
# needed only for fbsplash
#BuildPreReq: freetype2-devel-static libmng-devel-static liblcms-devel-static
#BuildPreReq: libjpeg-devel-static libpng-devel-static zlib-devel-static

Requires: hibernate-cleanup

%description
hibernate is a shell script that handles the process of getting ready
to suspend to disk and to resume from disk. It requires the Software
Suspend 2 patches available at http://suspend2.net/.
After installing you will want to run 'hibernate -h' to see available
options and modify your /etc/hibernate/hibernate.conf to set them.
This package includes %nuserui in the installation.

%package -n vim-plugin-%name-syntax
Group: Editors
Summary: Hibernate config syntax highlight script for VIm
Requires: %name = %version
#Conflicts: %name < %version
#Conflicts: %name > %version
Requires: vim-common >= 4:6.3.007-alt1

%description -n vim-plugin-%name-syntax
Syntax highlighting VIm plugin for configs of hibernate script.
You need this plugin if you want to edit your /etc/hibernate/*.conf
with highlighting of errors or deprecated parameters.

%package -n hibernate-cleanup
Group: System/Kernel and hardware
Summary: cleanses swsusp and Software Suspend 2 images.
Requires(post,preun): service

%description -n hibernate-cleanup
This script evokes hibernate-cleanup.sh. It invalidates any stale
swsusp and Software Suspend 2 images. It searches all swap partitions
on your machine, as well as Suspend2's filewriter files (by way of
the hibernate script telling it where to find it).

%prep
%setup -a 1 -q -n hibernate-script-%version
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p1
%patch4 -p1
%patch5 -p0
#patch6 -p1

%build
pushd %nuserui
#%%__ln_s ../fbsplash/linux fbanim/linux
%make CFLAGS="%optflags -O3"
popd

%install
export BASE_DIR=%buildroot \
PREFIX=%_prefix \
MAN_DIR=%buildroot%_mandir \
SCRIPTLET_DIR=%buildroot%_sysconfdir/hibernate/scriptlets.d/

sh install.sh

unset BASE_DIR PREFIX MAN_DIR SCRIPTLET_DIR

pushd %buildroot/etc/hibernate
%__cp %name.conf hibernate2.4.conf
%__cp %name.conf hibernate2.6.conf
%__rm -f %name.conf
popd

%__mkdir_p %buildroot{%_sysconfdir/{logrotate.d,rc.d/scripts,rc.d/init.d},%_datadir/vim/vimfiles/syntax}
%__install -m644 logrotate.d-hibernate-script %buildroot%_sysconfdir/logrotate.d/%name
%__install -m755 %nuserui/suspend2ui_text %buildroot/%_sbindir
%__install -m644 hibernate.vim %buildroot%_datadir/vim/vimfiles/syntax/
%__install -m755 init.d/hibernate-cleanup.sh %buildroot%_sysconfdir/rc.d/scripts/
%__install -m755 %SOURCE2 %buildroot%_sysconfdir/rc.d/init.d/

%__mkdir_p doc/%nuserui
%__cp -a README CHANGELOG SCRIPTLET-API admin/ \
doc/
%__cp -a %nuserui/{KERNEL_API,USERUI_API,ChangeLog,README,TODO} \
doc/%nuserui/

%post -n hibernate-cleanup
%post_service hibernate-cleanup

%preun -n hibernate-cleanup
%preun_service hibernate-cleanup

%files
%_sbindir/*
%config(noreplace) %_sysconfdir/hibernate
%config(noreplace) %_sysconfdir/logrotate.d/%name
%doc doc/*
%_mandir/man?/*

%files -n vim-plugin-%name-syntax
%_datadir/vim/vimfiles/syntax/*

%files -n hibernate-cleanup
%config %_sysconfdir/rc.d/scripts/*
%config %_sysconfdir/rc.d/init.d/*

%changelog

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

 
design & coding: Vladimir Lettiev aka crux © 2004-2005