- cleaned .spec file

This commit is contained in:
Peter Schiffer 2012-11-23 16:16:01 +01:00
parent 119e213981
commit 5e1d3a08e6

View File

@ -1,26 +1,22 @@
%define soversion 1.0.38 %global soversion_major 1
%define soversion_major 1 %global soversion 1.0.38
Name: libcgroup
Summary: Library to control and monitor control groups Summary: Library to control and monitor control groups
Group: Development/Libraries Name: libcgroup
Version: 0.38 Version: 0.38
Release: 3%{?dist} Release: 3%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries
URL: http://libcg.sourceforge.net/ URL: http://libcg.sourceforge.net/
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
Source1: cgconfig.service Source1: cgconfig.service
Source2: cgred.service Source2: cgred.service
Source3: cgred.sysconfig Source3: cgred.sysconfig
Patch1: fedora-config.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: fedora-config.patch
BuildRequires: pam-devel
BuildRequires: byacc BuildRequires: byacc, coreutils, flex, pam-devel
BuildRequires: flex
BuildRequires: coreutils
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): chkconfig, /sbin/service
Requires(preun): /sbin/chkconfig
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
@ -58,17 +54,15 @@ future allow creation of persistent configuration for control groups and
provide scripts to manage that configuration. provide scripts to manage that configuration.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q
%patch1 -p1 -b .config %patch0 -p1 -b .config-patch
%build %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} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
# install config files # 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 install -m 644 samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
# sanitize pam module, we need only pam_cgroup.so # 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 mv -f $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT%{_libdir}/security/pam_cgroup.so
rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/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 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 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/cgred install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/cgred
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
@ -123,13 +114,11 @@ getent group cgred >/dev/null || groupadd -r cgred
/bin/systemctl try-restart cgred.service >/dev/null 2>&1 || : /bin/systemctl try-restart cgred.service >/dev/null 2>&1 || :
%files %files
%defattr(-,root,root,-) %doc COPYING README
%{_libdir}/libcgroup.so.* %{_libdir}/libcgroup.so.*
%doc COPYING INSTALL
%files tools %files tools
%defattr(-,root,root,-) %doc COPYING README README_daemon README_systemd
%doc README_daemon README_systemd
%config(noreplace) %{_sysconfdir}/cgconfig.conf %config(noreplace) %{_sysconfdir}/cgconfig.conf
%config(noreplace) %{_sysconfdir}/cgrules.conf %config(noreplace) %{_sysconfdir}/cgrules.conf
%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf %config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
@ -153,22 +142,21 @@ getent group cgred >/dev/null || groupadd -r cgred
%{_unitdir}/cgred.service %{_unitdir}/cgred.service
%files pam %files pam
%defattr(-,root,root,-) %doc COPYING README
%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so %attr(0755,root,root) %{_libdir}/security/pam_cgroup.so
%doc COPYING INSTALL
%files devel %files devel
%defattr(-,root,root,-) %doc COPYING README
%{_includedir}/libcgroup.h %{_includedir}/libcgroup.h
%{_includedir}/libcgroup/*.h %{_includedir}/libcgroup/*.h
%{_libdir}/libcgroup.so %{_libdir}/libcgroup.so
%{_libdir}/pkgconfig/libcgroup.pc %{_libdir}/pkgconfig/libcgroup.pc
%doc COPYING INSTALL
%changelog %changelog
* Fri Nov 23 2012 Peter Schiffer <pschiffe@redhat.com> - 0.38-3 * Fri Nov 23 2012 Peter Schiffer <pschiffe@redhat.com> - 0.38-3
- resolves: #850183 - resolves: #850183
scriptlets replaced with new systemd macros (thanks to vpavlin) scriptlets replaced with new systemd macros (thanks to vpavlin)
- cleaned .spec file
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-2 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild