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