%define lveversion 0.7 Name: lve-utils Version: 0.4 Release: 4%{?dist}.art Summary: LVE control utilities License: GPL Group: System Environment/Base Source: %{name}.tar.bz2 Requires: lve >= %{lveversion} Requires: ncurses Prereq: /sbin/chkconfig BuildRequires: liblve-devel BuildRequires: automake BuildRequires: ncurses-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description This package provides lvectl and lveps utilities to control and test LVE subsystem. %prep %setup -q -n %{name} ./autogen.sh %configure --sysconfdir=/etc/container/ %build make LVE_UTILS_VERSION=%{version} LVE_UTILS_RELEASE=%{release} %install %{__rm} -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ install -D -m 755 etc/lvectl $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ install -D -m 755 src/lvetop $RPM_BUILD_ROOT%{_sbindir}/lvetop %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" %post %{_sbindir}/lvectl --apply # Register the lvectl service /sbin/chkconfig --add lvectl %preun if [ $1 = 0 ]; then /sbin/service lvectl stop > /dev/null 2>&1 /sbin/chkconfig --del lvectl fi %triggerpostun -- lve-utils < 0.4-3 if [ "$1" -ge "1" ]; then /sbin/chkconfig --del lvectl /sbin/chkconfig --add lvectl fi %files %defattr(-,root,root) %doc COPYING AUTHORS README INSTALL %{_sbindir}/lvectl %{_sbindir}/lveps %{_sbindir}/lvetop %config(noreplace) %{_sysconfdir}/container/* %{_sysconfdir}/rc.d/init.d/* %{_mandir}/man8/* %changelog * Thu Aug 19 2010 Leonid Kanter 0.4-3 - add trigger to change sysv start/stop order after upgrade * Thu Jul 15 2010 Andrew Perepechko 0.4-1.20100715git - supports the old syntax lvectl * Tue Jul 13 2010 Andrew Perepechko 0.4-1.20100713git - modify /etc/init.d/lvectl for a new syntax - reset default values in /etc/container/ve.cfg * Mon Jul 12 2010 Andrew Perepechko 0.4-1.20100710git - lvectl: additional information for assertions * Wed Jul 07 2010 Sergey Vakula 0.4-1.20100707git - renew to v0.4 - lveps, lvectl update * Thu Jun 10 2010 Sergey Vakula 0.3-0.1 - using dynamic lib * Wed Feb 03 2010 Andrew Perepechko 0.3-0.1 - added dynamic cpu usage output to lveps * Sat Jan 30 2010 Alexey Lyashkov 0.2-0.2 - kill duplicates in init.d scripts. - fix destory_all_ve to use lvectl --flush all - added man entry in spec file * Tue Dec 26 2009 Alexey Lyashkov 0.2-0.1 - move to 0.5 branch of liblve - add flush [all|default] command * Sat Dec 23 2009 Alexey Berezhok 0.1-0.1 - change path to config file * Tue Dec 22 2009 Andrew Perepechko 0.1-0.1 - added user/group output to lveps * Sat Dec 19 2009 Andrew Perepechko 0.1-0.1 - initial implementation of lveps * Thu Dec 17 2009 Berezhok Alexey 0.1-0.1 - added correct spec file with service installation. created config file and service script * Wed Dec 02 2009 Leonid Kanter 0.1-0.1 - initial package