File libcgroup1.spec of Package libcgroup1

#
# spec file for package libcgroup1 (Version 0.32.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libcgroup1
Version:        0.32.1
Release:        1
License:        LGPL v2.1 only
Group:          System/Management
AutoReqProv:    on
Summary:        Control groups management tools
Url:            http://sourceforge.net/projects/libcg/
Source:         http://surfnet.dl.sourceforge.net/sourceforge/libcg/libcgroup-%{version}.tar.bz2
Source1:        initd_cgconfig
Source2:        initd_cgred
Source3:        sysconfig.cgred
Patch:          libcgroup-yacc.patch
Patch1:         libcgroup-sigaction.patch
Patch2:         libcgroup-print_to_perror.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  bison flex gcc-c++
Requires:       insserv

%description
Control groups, a new kernel feature in Linux 2.6.24 provides a file
system interface to manipulate and control the details on task grouping
including creation of new task groups (control groups), permission
handling and task assignment.



Authors:
--------
    Balbir Singh <balbir_singh@users.sourceforge.net>
    Dhaval Giani <dhaval_giani@users.sourceforge.net>

%package -n libcgroup-devel
License:        LGPL v2.1 only
Summary:        Control groups management tools devel package
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n libcgroup-devel
Control groups, a new kernel feature in Linux 2.6.24 provides a file
system interface to manipulate and control the details on task grouping
including creation of new task groups (control groups), permission
handling and task assignment.



Authors:
--------
    Balbir Singh <balbir_singh@users.sourceforge.net>
    Dhaval Giani <dhaval_giani@users.sourceforge.net>

%prep
%setup -n libcgroup-%{version}
%patch0 -p1
%patch1
%patch2 -p1

%build
autoreconf -fi
%configure
make

%install
%makeinstall
mkdir -p %{buildroot}/%{_sysconfdir}/init.d/
install -m 755 %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/cgconfig
install -m 755 %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/cgred
mkdir -p %{buildroot}/%{_localstatedir}/adm/fillup-templates/
install -m 644 %{SOURCE3} %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.cgred

%clean
rm -rf %{buildroot}

%preun
%{stop_on_removal cgred}
%{stop_on_removal cgconfig}

%post
%{fillup_and_insserv -f cgconfig}
%{fillup_and_insserv -n cgred}
%{run_ldconfig}

%postun
%{insserv_cleanup}
%{run_ldconfig}

%files
%defattr(-,root,root)
%doc COPYING
%doc README
%doc README_daemon
%doc INSTALL
%doc samples/cgconfig.conf
%doc samples/cgrules.conf
%{_sysconfdir}/init.d/cgconfig
%{_sysconfdir}/init.d/cgred
%{_bindir}/cg*
%{_sbindir}/cg*
%{_libdir}/libcgroup-*.so
%{_libdir}/libcgroup.so.*
%{_localstatedir}/adm/fillup-templates/sysconfig.cgred

%files -n libcgroup-devel
%defattr(-,root,root)
%{_libdir}/libcgroup.so
%{_includedir}/libcgroup.h

%changelog
* Thu Nov 06 2008 jslaby@suse.cz
- Update to 0.32.1
- Add init.d scripts configuration samples.
* Mon Oct 20 2008 schwab@suse.de
- Fix invalid use of sigaction.
* Wed Oct 15 2008 kukuk@suse.de
- Fix typo
* Tue Oct 14 2008 kukuk@suse.de
- Fix name of devel package
* Wed Oct 01 2008 jslaby@suse.cz
- initial package
openSUSE Build Service is sponsored by