]> git.pld-linux.org Git - packages/libcgroup.git/blob - libcgroup.spec
- raw from fedora
[packages/libcgroup.git] / libcgroup.spec
1 %define soversion 1.0.34
2
3 Name: libcgroup
4 Summary: Tools and libraries to control and monitor control groups
5 Group: Development/Libraries
6 Version: 0.34
7 Release:        1
8 License: LGPLv2+
9 URL: http://libcg.sourceforge.net/
10 Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
11 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 BuildRequires: pam-devel
13 BuildRequires: byacc
14 BuildRequires: flex
15 BuildRequires: coreutils
16 Requires(post): chkconfig, /sbin/service
17 Requires(preun): /sbin/chkconfig
18
19 %description
20 Control groups infrastructure. The tools and library help manipulate, control,
21 administrate and monitor control groups and the associated controllers.
22
23 %package devel
24 Summary: Development libraries to develop applications that utilize control groups
25 Group: Development/Libraries
26 Requires: libcgroup = %{version}-%{release}
27
28 %description devel
29 It provides API to create/delete and modify cgroup nodes. It will also in the
30 future allow creation of persistent configuration for control groups and
31 provide scripts to manage that configuration.
32
33 %prep
34 %setup -q
35
36 %build
37 %configure --bindir=/bin --sbindir=/sbin --libdir=/%{_lib}
38
39 make %{?_smp_mflags}
40
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 make DESTDIR=$RPM_BUILD_ROOT install
45
46 # install init scripts
47 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
48 cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/%{_initrddir}/cgconfig
49 cp scripts/init.d/cgred $RPM_BUILD_ROOT/%{_initrddir}/cgred
50
51 # install config files
52 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
53 cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
54 cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
55 cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
56
57 # sanitize pam module, we need only pam_cgroup.so in the right directory
58 mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
59 mv -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
60 rm -f $RPM_BUILD_ROOT/%{_lib}/pam_cgroup*
61
62 # move the devel stuff to /usr
63 mkdir -p $RPM_BUILD_ROOT/%{_libdir}
64 mv -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.la $RPM_BUILD_ROOT/%{_libdir}
65 rm -f $RPM_BUILD_ROOT/%{_lib}/libcgroup.so
66 ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %post 
72 /sbin/ldconfig
73 /sbin/chkconfig --add cgred
74 /sbin/chkconfig --add cgconfig
75
76 %preun
77 if [ $1 = 0 ]; then
78     /sbin/service cgred stop > /dev/null 2>&1 || :
79     /sbin/service cgconfig stop > /dev/null 2>&1 || :
80     /sbin/chkconfig --del cgconfig
81     /sbin/chkconfig --del cgred
82 fi
83
84 %postun -p /sbin/ldconfig
85
86 %files 
87 %defattr(-,root,root,-)
88 %config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
89 %config(noreplace) %{_sysconfdir}/cgconfig.conf
90 %config(noreplace) %{_sysconfdir}/cgrules.conf
91 /%{_lib}/libcgroup.so.*
92 /bin/cgexec
93 /bin/cgclassify
94 /sbin/cgconfigparser
95 /sbin/cgrulesengd
96 %attr(0644, root, root) %{_mandir}/man1/*
97 %attr(0644, root, root) %{_mandir}/man5/*
98 %attr(0644, root, root) %{_mandir}/man8/*
99 %attr(0755,root,root) %{_initrddir}/cgconfig
100 %attr(0755,root,root) %{_initrddir}/cgred
101 %attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
102
103 %doc COPYING INSTALL README_daemon
104
105 %files devel
106 %defattr(-,root,root,-)
107 %{_includedir}/libcgroup.h
108 %{_libdir}/libcgroup.*
109 %doc COPYING INSTALL 
110
111
112 %changelog
113 * Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
114 - Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
115 * Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
116 - Update to latest upstream
117 * Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
118 - Update to latest upstream
119 * Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
120 - Change release to fix broken upgrade path
121 * Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
122 - Update to latest upstream version
123 * Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
124 - Add post and postun. Also fix Requires for devel to depend on base n-v-r
125 * Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
126 - Fix makeinstall, Source0 and URL (review comments from Tom)
127 * Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
128 - Add a generatable spec file
129 * Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
130 - Get the spec file to work
131 * Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
132 - The first version of libcg
This page took 0.092209 seconds and 4 git commands to generate.