clamd handicraft work
Jason L Tibbitts III
tibbs at math.uh.edu
Fri Jul 1 00:13:54 UTC 2005
>>>>> "WT" == Warren Togami <wtogami at redhat.com> writes:
WT> What we need instead are clamav-something packages containing the
WT> /etc/rc.d/init.rd/ files, prepared for different specific uses of
WT> clamd.
See http://www.math.uh.edu/~tibbs/packages/clamav-exim for a
ten-minute attempt. Here's the .spec; it's not very good at all but
if someone thinks worthy of comments I'll clean it up.
- J<
Name: clamav-exim
Version: 0.0
Release: 1%{?dist}
Summary: An instance of clamav for use with the Exim MTA
Group: Applications/File
License: Public Domain
Source0: clamd.exim-init
Source1: clamd-exim.conf
Source2: clamd-exim.logrotate
Source3: clamd.exim-sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: clamav-server
%description
This package contains the special files needed to start a server
instance of clamav for use by the Exim mail transfer agent.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_var}/log
mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.exim
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
touch $RPM_BUILD_ROOT%{_var}/log/clamd-exim.log
install -c -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_initrddir}/clamd.exim
install -c -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/exim.conf
install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/clamd-exim
install -c -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.exim
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add clamd.exim
/sbin/service clamd.exim condrestart >> /dev/null
exit 0
%preun
if [ $1 = 0 ]; then
/sbin/chkconfig --del clamd.exim
/sbin/service clamd.exim stop >> /dev/null
fi
%files
%defattr(-,root,root,-)
%{_initrddir}/clamd.exim
%{_sysconfdir}/clamd.d/exim.conf
%{_sysconfdir}/logrotate.d/clamd-exim
%{_sysconfdir}/sysconfig/clamd.exim
%attr(-,exim,exim) %{_var}/log/clamd-exim.log
%attr(-,exim,exim) %dir %{_var}/run/clamd.exim
%changelog
* Thu Jun 30 2005 Jason L Tibbitts III <tibbs at math.uh.edu> - 0.0-1
- Initial build
More information about the fedora-extras-list
mailing list