From 5e1d3a08e677ed1eb79388b998f7ac387173d66c Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Nov 23 2012 15:16:01 +0000 Subject: - cleaned .spec file --- diff --git a/libcgroup.spec b/libcgroup.spec index 2695c5c..09d0319 100644 --- a/libcgroup.spec +++ b/libcgroup.spec @@ -1,26 +1,22 @@ -%define soversion 1.0.38 -%define soversion_major 1 +%global soversion_major 1 +%global soversion 1.0.38 -Name: libcgroup Summary: Library to control and monitor control groups -Group: Development/Libraries +Name: libcgroup Version: 0.38 Release: 3%{?dist} License: LGPLv2+ +Group: Development/Libraries URL: http://libcg.sourceforge.net/ Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 Source1: cgconfig.service Source2: cgred.service Source3: cgred.sysconfig -Patch1: fedora-config.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: pam-devel -BuildRequires: byacc -BuildRequires: flex -BuildRequires: coreutils + +Patch0: fedora-config.patch + +BuildRequires: byacc, coreutils, flex, pam-devel Requires(pre): shadow-utils -Requires(post): chkconfig, /sbin/service -Requires(preun): /sbin/chkconfig Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -58,17 +54,15 @@ future allow creation of persistent configuration for control groups and provide scripts to manage that configuration. %prep -%setup -q -n %{name}-%{version} -%patch1 -p1 -b .config +%setup -q +%patch0 -p1 -b .config-patch %build -%configure --enable-pam-module-dir=/%{_lib}/security --enable-opaque-hierarchy="name=systemd" - +%configure --enable-pam-module-dir=%{_libdir}/security \ + --enable-opaque-hierarchy="name=systemd" make %{?_smp_mflags} - %install -rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # install config files @@ -78,8 +72,8 @@ install -m 644 samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf install -m 644 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.* rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la @@ -90,9 +84,6 @@ install -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir}/ install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/cgred -%clean -rm -rf $RPM_BUILD_ROOT - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -122,14 +113,12 @@ getent group cgred >/dev/null || groupadd -r cgred /sbin/chkconfig --del cgred >/dev/null 2>&1 || : /bin/systemctl try-restart cgred.service >/dev/null 2>&1 || : -%files -%defattr(-,root,root,-) +%files +%doc COPYING README %{_libdir}/libcgroup.so.* -%doc COPYING INSTALL %files tools -%defattr(-,root,root,-) -%doc README_daemon README_systemd +%doc COPYING README README_daemon README_systemd %config(noreplace) %{_sysconfdir}/cgconfig.conf %config(noreplace) %{_sysconfdir}/cgrules.conf %config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf @@ -153,22 +142,21 @@ getent group cgred >/dev/null || groupadd -r cgred %{_unitdir}/cgred.service %files pam -%defattr(-,root,root,-) -%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so -%doc COPYING INSTALL +%doc COPYING README +%attr(0755,root,root) %{_libdir}/security/pam_cgroup.so %files devel -%defattr(-,root,root,-) +%doc COPYING README %{_includedir}/libcgroup.h %{_includedir}/libcgroup/*.h %{_libdir}/libcgroup.so %{_libdir}/pkgconfig/libcgroup.pc -%doc COPYING INSTALL %changelog * Fri Nov 23 2012 Peter Schiffer - 0.38-3 - resolves: #850183 scriptlets replaced with new systemd macros (thanks to vpavlin) +- cleaned .spec file * Thu Jul 19 2012 Fedora Release Engineering - 0.38-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild