]>
Commit | Line | Data |
---|---|---|
3d200c45 JB |
1 | Summary: Tools and library to control and monitor control groups |
2 | Summary(pl.UTF-8): Narzędzia i biblioteka do kontrolowania i monitorowania grup kontroli | |
ada0366c | 3 | Name: libcgroup |
0779ceb5 | 4 | Version: 0.37 |
9284067d | 5 | Release: 2 |
b9cd8aa6 | 6 | License: LGPL v2+ |
f6ad0e0b | 7 | Group: Libraries |
a89c8411 | 8 | Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 |
0779ceb5 | 9 | # Source0-md5: beecca8770155afa62981076e96d4c9c |
49919ec9 JR |
10 | Source1: cgconfig.init |
11 | Source2: cgred.init | |
ada0366c | 12 | URL: http://libcg.sourceforge.net/ |
afdac001 | 13 | BuildRequires: bison |
ada0366c | 14 | BuildRequires: flex |
afdac001 | 15 | BuildRequires: libstdc++-devel |
ada0366c | 16 | BuildRequires: pam-devel |
b9cd8aa6 | 17 | Requires(post): /sbin/ldconfig |
7e9e387f ER |
18 | Requires(post,preun): /sbin/chkconfig |
19 | Requires: procps | |
b9cd8aa6 | 20 | Requires: rc-scripts |
ada0366c | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23fdf35f | 22 | |
f6ad0e0b | 23 | %define _exec_prefix %{nil} |
0779ceb5 | 24 | %define _libdir %{_prefix}/%{_lib} |
080074c8 | 25 | |
23fdf35f | 26 | %description |
ada0366c PG |
27 | Control groups infrastructure. The tools and library help manipulate, |
28 | control, administrate and monitor control groups and the associated | |
29 | controllers. | |
23fdf35f | 30 | |
3d200c45 JB |
31 | %description -l pl.UTF-8 |
32 | Ten pakiet stanowi infrastrukturę grup kontroli (cgroups). Narzędzia i | |
33 | biblioteka pomagają modyfikować, sterować, administrować i | |
34 | modyfikować grupy kontroli i powiązane z nimi kontrolery. | |
35 | ||
23fdf35f | 36 | %package devel |
3d200c45 JB |
37 | Summary: Header files for cgroup library |
38 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cgroup | |
ada0366c | 39 | Group: Development/Libraries |
b9cd8aa6 | 40 | Requires: %{name} = %{version}-%{release} |
23fdf35f PG |
41 | |
42 | %description devel | |
ada0366c PG |
43 | It provides API to create/delete and modify cgroup nodes. It will also |
44 | in the future allow creation of persistent configuration for control | |
45 | groups and provide scripts to manage that configuration. | |
23fdf35f | 46 | |
3d200c45 JB |
47 | %description devel -l pl.UTF-8 |
48 | Ten pakiet udostępnia API do tworzenia, usuwania i modyfikowania | |
49 | węzłów cgroup. W przyszłości pozwoli także na tworzenie trwałej | |
50 | konfiguracji grup kontroli i udostępni skrypty do zarządzania taką | |
51 | konfiguracją. | |
52 | ||
c2b28c24 ER |
53 | %package -n pam-pam_cgroup |
54 | Summary: PAM module for libcgroup | |
3d200c45 | 55 | Summary(pl.UTF-8): Moduł PAM dla libcgroup |
ea035f2c BZ |
56 | Group: Libraries |
57 | Requires: %{name} = %{version}-%{release} | |
c2b28c24 | 58 | Obsoletes: libcgroup-pam |
ea035f2c | 59 | |
c2b28c24 ER |
60 | %description -n pam-pam_cgroup |
61 | PAM module for libcgroup. | |
ea035f2c | 62 | |
3d200c45 JB |
63 | %description -n pam-pam_cgroup -l pl.UTF-8 |
64 | Moduł PAM dla libcgroup. | |
65 | ||
23fdf35f PG |
66 | %prep |
67 | %setup -q | |
68 | ||
69 | %build | |
0779ceb5 | 70 | %configure \ |
f6ad0e0b | 71 | --disable-silent-rules \ |
0779ceb5 TP |
72 | --enable-initscript-install \ |
73 | --enable-pam-module-dir=/%{_lib}/security | |
74 | ||
ada0366c | 75 | %{__make} |
23fdf35f PG |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
0779ceb5 TP |
79 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
80 | ||
ada0366c PG |
81 | %{__make} install \ |
82 | DESTDIR=$RPM_BUILD_ROOT | |
23fdf35f | 83 | |
49919ec9 JR |
84 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cgconfig |
85 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cgred | |
86 | ||
0779ceb5 TP |
87 | cp -a samples/cgred.conf $RPM_BUILD_ROOT/etc/sysconfig/cgred.conf |
88 | cp -a samples/cgconfig.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/cgconfig | |
89 | cp -a samples/cg{config,rules,snapshot_blacklist}.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
23fdf35f | 90 | |
0779ceb5 | 91 | mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so{.*.*.*,} |
080074c8 | 92 | mv $RPM_BUILD_ROOT%{_libdir}/libcgroup.so.* $RPM_BUILD_ROOT/%{_lib} |
b9cd8aa6 | 93 | ln -snf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcgroup.so |
23fdf35f | 94 | |
0779ceb5 TP |
95 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.* |
96 | %{__rm} $RPM_BUILD_ROOT{/%{_lib}/security,%{_libdir}}/*.la | |
97 | ||
23fdf35f PG |
98 | %clean |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
0779ceb5 TP |
101 | #%%pre |
102 | #getent group cgred >/dev/null || groupadd cgred | |
103 | ||
ada0366c | 104 | %post |
23fdf35f PG |
105 | /sbin/ldconfig |
106 | /sbin/chkconfig --add cgred | |
107 | /sbin/chkconfig --add cgconfig | |
108 | ||
109 | %preun | |
110 | if [ $1 = 0 ]; then | |
b9cd8aa6 ER |
111 | %service cgred stop |
112 | %service cgconfig stop | |
113 | /sbin/chkconfig --del cgconfig | |
114 | /sbin/chkconfig --del cgred | |
23fdf35f PG |
115 | fi |
116 | ||
117 | %postun -p /sbin/ldconfig | |
118 | ||
ada0366c PG |
119 | %files |
120 | %defattr(644,root,root,755) | |
0779ceb5 TP |
121 | %doc README README_daemon |
122 | %attr(754,root,root) /etc/rc.d/init.d/cg* | |
123 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cg* | |
124 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cg*.conf | |
125 | ||
126 | %attr(755,root,root) /bin/cg* | |
a89c8411 BZ |
127 | %attr(755,root,root) /bin/lscgroup |
128 | %attr(755,root,root) /bin/lssubsys | |
0779ceb5 | 129 | %attr(755,root,root) /sbin/cg* |
a89c8411 | 130 | |
b9cd8aa6 | 131 | %attr(755,root,root) /%{_lib}/libcgroup.so.*.*.* |
eabb9c00 | 132 | %attr(755,root,root) %ghost /%{_lib}/libcgroup.so.1 |
a89c8411 | 133 | |
0779ceb5 TP |
134 | %{_mandir}/man1/ls*.1* |
135 | %{_mandir}/man1/cg*.1* | |
136 | %{_mandir}/man5/cg*.5* | |
137 | %{_mandir}/man8/cg*.8* | |
23fdf35f | 138 | |
c2b28c24 | 139 | %files -n pam-pam_cgroup |
ea035f2c BZ |
140 | %defattr(644,root,root,755) |
141 | %attr(755,root,root) /%{_lib}/security/pam_cgroup.so | |
142 | ||
23fdf35f | 143 | %files devel |
ada0366c | 144 | %defattr(644,root,root,755) |
a89c8411 | 145 | %attr(755,root,root) %{_libdir}/libcgroup.so |
a89c8411 | 146 | %{_includedir}/libcgroup |
0779ceb5 | 147 | %{_includedir}/libcgroup.h |
a89c8411 | 148 | %{_pkgconfigdir}/libcgroup.pc |