1 Summary: Tools and libraries to control and monitor control groups
6 Group: Development/Libraries
7 Source0: http://dl.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
8 # Source0-md5: 681c751d1a1ea78615094007d39db6cb
9 URL: http://libcg.sourceforge.net/
11 BuildRequires: pam-devel
12 Requires(post): /sbin/chkconfig
13 Requires(post): /sbin/ldconfig
14 Requires(preun): /sbin/chkconfig
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Control groups infrastructure. The tools and library help manipulate,
20 control, administrate and monitor control groups and the associated
24 Summary: Development libraries to develop applications that utilize control groups
25 Group: Development/Libraries
26 Requires: %{name} = %{version}-%{release}
29 It provides API to create/delete and modify cgroup nodes. It will also
30 in the future allow creation of persistent configuration for control
31 groups and provide scripts to manage that configuration.
45 rm -rf $RPM_BUILD_ROOT
47 DESTDIR=$RPM_BUILD_ROOT
49 # install init scripts
50 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
51 cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/etc/rc.d/init.d/cgconfig
52 cp scripts/init.d/cgred $RPM_BUILD_ROOT/etc/rc.d/init.d/cgred
54 # install config files
55 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
56 cp samples/cgred.conf $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/cgred.conf
57 cp samples/cgconfig.conf $RPM_BUILD_ROOT%{_sysconfdir}/cgconfig.conf
58 cp samples/cgrules.conf $RPM_BUILD_ROOT%{_sysconfdir}/cgrules.conf
60 # sanitize pam module, we need only pam_cgroup.so in the right directory
61 install -d $RPM_BUILD_ROOT/%{_lib}/security
62 mv -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
63 rm -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup*
65 # move the devel stuff to %{_prefix}
66 install -d $RPM_BUILD_ROOT%{_libdir}
67 mv -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.la $RPM_BUILD_ROOT%{_libdir}
68 rm -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.so
69 ln -snf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcgroup.so
72 rm -rf $RPM_BUILD_ROOT
76 /sbin/chkconfig --add cgred
77 /sbin/chkconfig --add cgconfig
82 %service cgconfig stop
83 /sbin/chkconfig --del cgconfig
84 /sbin/chkconfig --del cgred
87 %postun -p /sbin/ldconfig
90 %defattr(644,root,root,755)
91 %doc INSTALL README_daemon
92 %config(noreplace) %{_sysconfdir}/cgconfig.conf
93 %config(noreplace) %{_sysconfdir}/cgrules.conf
94 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cgred.conf
95 %attr(754,root,root) /etc/rc.d/init.d/cgconfig
96 %attr(754,root,root) /etc/rc.d/init.d/cgred
97 %attr(755,root,root) /%{_lib}/libcgroup.so.*.*.*
98 %attr(755,root,root) %ghost /%{_lib}/libcgroup.so.1
99 %attr(755,root,root) /%{_lib}/security/pam_cgroup.so
100 %attr(755,root,root) /bin/cgexec
101 %attr(755,root,root) /bin/cgclassify
102 %attr(755,root,root) /sbin/cgconfigparser
103 %attr(755,root,root) /sbin/cgrulesengd
104 %{_mandir}/man1/cgclassify.1*
105 %{_mandir}/man1/cgexec.1*
106 %{_mandir}/man5/cgconfig.conf.5*
107 %{_mandir}/man5/cgred.conf.5*
108 %{_mandir}/man5/cgrules.conf.5*
109 %{_mandir}/man8/cgconfigparser.8*
110 %{_mandir}/man8/cgrulesengd.8*
113 %defattr(644,root,root,755)
115 %{_includedir}/libcgroup.h
116 %{_libdir}/libcgroup.la
117 %{_libdir}/libcgroup.so