diff --git a/libcgroup.spec b/libcgroup.spec index 85f2e63..f3b0e08 100644 --- a/libcgroup.spec +++ b/libcgroup.spec @@ -22,6 +22,7 @@ BuildRequires: coreutils Requires(pre): shadow-utils Requires(post): chkconfig, /sbin/service Requires(preun): /sbin/chkconfig +Conflicts: filesystem < 3 %description Control groups infrastructure. The library helps manipulate, control, @@ -63,7 +64,7 @@ provide scripts to manage that configuration. %patch4 -p1 -b .systemd2 %build -%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security +%configure --enable-initscript-install --enable-pam-module-dir=%{_libdir}/security make %{?_smp_mflags} @@ -81,16 +82,10 @@ cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf # sanitize pam module, we need only pam_cgroup.so -mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so -rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.* +mv -f $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.so +rm -f $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.la $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.so.* -# move the libraries to / -mkdir -p $RPM_BUILD_ROOT/%{_lib} -mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib} -rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major} -ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major} -ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la # pre-create /cgroup directory mkdir $RPM_BUILD_ROOT/cgroup @@ -123,7 +118,7 @@ fi %files %defattr(-,root,root,-) -/%{_lib}/libcgroup.so.* +%{_libdir}/libcgroup.so.* %doc COPYING INSTALL README.Fedora %attr(0755,root,root) %ghost %dir /cgroup @@ -135,18 +130,18 @@ fi %config(noreplace) %{_sysconfdir}/cgconfig.conf %config(noreplace) %{_sysconfdir}/cgrules.conf %config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf -/bin/cgclassify -/bin/cgcreate -/bin/cgget -/bin/cgset -/bin/cgdelete -/bin/lscgroup -/bin/lssubsys -/sbin/cgconfigparser -/sbin/cgrulesengd -/sbin/cgclear -/bin/cgsnapshot -%attr(2755, root, cgred) /bin/cgexec +%{_bindir}/cgclassify +%{_bindir}/cgcreate +%{_bindir}/cgget +%{_bindir}/cgset +%{_bindir}/cgdelete +%{_bindir}/lscgroup +%{_bindir}/lssubsys +%{_sbindir}/cgconfigparser +%{_sbindir}/cgrulesengd +%{_sbindir}/cgclear +%{_bindir}/cgsnapshot +%attr(2755, root, cgred) %{_bindir}/cgexec %attr(0644, root, root) %{_mandir}/man1/* %attr(0644, root, root) %{_mandir}/man5/* %attr(0644, root, root) %{_mandir}/man8/* @@ -155,7 +150,7 @@ fi %files pam %defattr(-,root,root,-) -%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so +%attr(0755,root,root) %{_libdir}/security/pam_cgroup.so %doc COPYING INSTALL %files devel @@ -163,7 +158,7 @@ fi %{_includedir}/libcgroup.h %{_includedir}/libcgroup/*.h %{_libdir}/libcgroup.* -/%{_libdir}/pkgconfig/libcgroup.pc +%{_libdir}/pkgconfig/libcgroup.pc %doc COPYING INSTALL %changelog