]>
Commit | Line | Data |
---|---|---|
080074c8 ER |
1 | # TODO |
2 | # - pldize initscripts | |
ada0366c PG |
3 | Summary: Tools and libraries to control and monitor control groups |
4 | Name: libcgroup | |
0779ceb5 | 5 | Version: 0.37 |
ada0366c | 6 | Release: 1 |
b9cd8aa6 | 7 | License: LGPL v2+ |
f6ad0e0b | 8 | Group: Libraries |
a89c8411 | 9 | Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 |
0779ceb5 | 10 | # Source0-md5: beecca8770155afa62981076e96d4c9c |
ada0366c | 11 | URL: http://libcg.sourceforge.net/ |
afdac001 | 12 | BuildRequires: bison |
ada0366c | 13 | BuildRequires: flex |
afdac001 | 14 | BuildRequires: libstdc++-devel |
ada0366c | 15 | BuildRequires: pam-devel |
b9cd8aa6 | 16 | Requires(post): /sbin/ldconfig |
7e9e387f ER |
17 | Requires(post,preun): /sbin/chkconfig |
18 | Requires: procps | |
b9cd8aa6 | 19 | Requires: rc-scripts |
ada0366c | 20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23fdf35f | 21 | |
f6ad0e0b | 22 | %define _exec_prefix %{nil} |
0779ceb5 | 23 | %define _libdir %{_prefix}/%{_lib} |
080074c8 | 24 | |
23fdf35f | 25 | %description |
ada0366c PG |
26 | Control groups infrastructure. The tools and library help manipulate, |
27 | control, administrate and monitor control groups and the associated | |
28 | controllers. | |
23fdf35f PG |
29 | |
30 | %package devel | |
ea035f2c | 31 | Summary: Development libraries for %{name} |
ada0366c | 32 | Group: Development/Libraries |
b9cd8aa6 | 33 | Requires: %{name} = %{version}-%{release} |
23fdf35f PG |
34 | |
35 | %description devel | |
ada0366c PG |
36 | It provides API to create/delete and modify cgroup nodes. It will also |
37 | in the future allow creation of persistent configuration for control | |
38 | groups and provide scripts to manage that configuration. | |
23fdf35f | 39 | |
c2b28c24 ER |
40 | %package -n pam-pam_cgroup |
41 | Summary: PAM module for libcgroup | |
ea035f2c BZ |
42 | Group: Libraries |
43 | Requires: %{name} = %{version}-%{release} | |
c2b28c24 | 44 | Obsoletes: libcgroup-pam |
ea035f2c | 45 | |
c2b28c24 ER |
46 | %description -n pam-pam_cgroup |
47 | PAM module for libcgroup. | |
ea035f2c | 48 | |
23fdf35f PG |
49 | %prep |
50 | %setup -q | |
51 | ||
52 | %build | |
0779ceb5 | 53 | %configure \ |
f6ad0e0b | 54 | --disable-silent-rules \ |
0779ceb5 TP |
55 | --enable-initscript-install \ |
56 | --enable-pam-module-dir=/%{_lib}/security | |
57 | ||
ada0366c | 58 | %{__make} |
23fdf35f PG |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
0779ceb5 TP |
62 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
63 | ||
ada0366c PG |
64 | %{__make} install \ |
65 | DESTDIR=$RPM_BUILD_ROOT | |
23fdf35f | 66 | |
0779ceb5 TP |
67 | cp -a samples/cgred.conf $RPM_BUILD_ROOT/etc/sysconfig/cgred.conf |
68 | cp -a samples/cgconfig.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/cgconfig | |
69 | cp -a samples/cg{config,rules,snapshot_blacklist}.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
23fdf35f | 70 | |
0779ceb5 | 71 | mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so{.*.*.*,} |
080074c8 | 72 | mv $RPM_BUILD_ROOT%{_libdir}/libcgroup.so.* $RPM_BUILD_ROOT/%{_lib} |
b9cd8aa6 | 73 | ln -snf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcgroup.so |
23fdf35f | 74 | |
0779ceb5 TP |
75 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.* |
76 | %{__rm} $RPM_BUILD_ROOT{/%{_lib}/security,%{_libdir}}/*.la | |
77 | ||
23fdf35f PG |
78 | %clean |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
0779ceb5 TP |
81 | #%%pre |
82 | #getent group cgred >/dev/null || groupadd cgred | |
83 | ||
ada0366c | 84 | %post |
23fdf35f PG |
85 | /sbin/ldconfig |
86 | /sbin/chkconfig --add cgred | |
87 | /sbin/chkconfig --add cgconfig | |
88 | ||
89 | %preun | |
90 | if [ $1 = 0 ]; then | |
b9cd8aa6 ER |
91 | %service cgred stop |
92 | %service cgconfig stop | |
93 | /sbin/chkconfig --del cgconfig | |
94 | /sbin/chkconfig --del cgred | |
23fdf35f PG |
95 | fi |
96 | ||
97 | %postun -p /sbin/ldconfig | |
98 | ||
ada0366c PG |
99 | %files |
100 | %defattr(644,root,root,755) | |
0779ceb5 TP |
101 | %doc README README_daemon |
102 | %attr(754,root,root) /etc/rc.d/init.d/cg* | |
103 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cg* | |
104 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cg*.conf | |
105 | ||
106 | %attr(755,root,root) /bin/cg* | |
a89c8411 BZ |
107 | %attr(755,root,root) /bin/lscgroup |
108 | %attr(755,root,root) /bin/lssubsys | |
0779ceb5 | 109 | %attr(755,root,root) /sbin/cg* |
a89c8411 | 110 | |
b9cd8aa6 | 111 | %attr(755,root,root) /%{_lib}/libcgroup.so.*.*.* |
eabb9c00 | 112 | %attr(755,root,root) %ghost /%{_lib}/libcgroup.so.1 |
a89c8411 | 113 | |
0779ceb5 TP |
114 | %{_mandir}/man1/ls*.1* |
115 | %{_mandir}/man1/cg*.1* | |
116 | %{_mandir}/man5/cg*.5* | |
117 | %{_mandir}/man8/cg*.8* | |
23fdf35f | 118 | |
c2b28c24 | 119 | %files -n pam-pam_cgroup |
ea035f2c BZ |
120 | %defattr(644,root,root,755) |
121 | %attr(755,root,root) /%{_lib}/security/pam_cgroup.so | |
122 | ||
23fdf35f | 123 | %files devel |
ada0366c | 124 | %defattr(644,root,root,755) |
a89c8411 | 125 | %attr(755,root,root) %{_libdir}/libcgroup.so |
a89c8411 | 126 | %{_includedir}/libcgroup |
0779ceb5 | 127 | %{_includedir}/libcgroup.h |
a89c8411 | 128 | %{_pkgconfigdir}/libcgroup.pc |