setroubleshoot/setroubleshoot.spec

100 lines
2.7 KiB
RPMSpec
Raw Normal View History

Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 0.6
2006-07-18 20:12:55 +00:00
Release: 2
License: GPL
Group: Applications/System
URL: http://www.redhat.com/
Source0: %{name}-%{version}.tar.gz
Source1: setroubleshoot.init
Source2: setroubleshoot.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define pkgpythondir %{python_sitelib}/%{name}
%define pkgdocdir %{_datadir}/doc/%{name}-%{version}
%define pkgdatadir %{_datadir}/%{name}
%define pkglibexecdir %{_prefix}/libexec/%{name}
%define pkgvardatadir %{_localstatedir}/lib/%{name}
%define pkgrundir %{_localstatedir}/run/%{name}
%define pkgconfigdir %{_sysconfdir}/%{name}
%define pkglogdir %{_localstatedir}/log/%{name}
%define auditlibdir %{_libdir}/audit
Requires: audit-libs-python
Requires: libselinux >= 1.30.15-1
Requires: pygtk2 >= 2.9.2
2006-07-18 20:12:55 +00:00
BuildRequires: intltool gettext python
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
%description
Provides tools to help diagnose SELinux problems. When AVC messages
are generated an alert can be generated that will give information
about the problem and help track its resolution. Alerts can be configured
to user preference. The same tools can be run on existing log files.
%prep
%setup -q
%build
%configure
make
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%{__install} -D -m755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/%{name}
%{__install} -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%post
/usr/bin/update-desktop-database %{_datadir}/applications
/sbin/chkconfig --add %{name}
[ -x /sbin/service ] && /sbin/service %{name} condrestart
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
/usr/bin/update-desktop-database %{_datadir}/applications
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc %{pkgdocdir}
%{_sbindir}/*
%{auditlibdir}/*
%{pkgpythondir}
%{pkgdatadir}
%config(noreplace) %{pkgconfigdir}/%{name}.cfg
%dir %{pkglogdir}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{pkgrundir}
%dir %{pkgvardatadir}
/etc/rc.d/init.d/%{name}
%{_sysconfdir}/xdg/autostart/*
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*png
%changelog
* Mon Jun 26 2006 John Dennis <jdennis@redhat.com> - 0.3-1
- add missing /var/log directory %files section in spec file, and add
logrotate script
* Mon Jun 26 2006 John Dennis <jdennis@redhat.com> - 0.2-1
- clean up spec file, reduce rpmlint complaints
* Fri May 19 2006 John Dennis <jdennis@redhat.com> - 0.1-1
- Initial build.