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