[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/spamass-milter/devel spamass-milter.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2



Author: pghmcfc

Update of /cvs/extras/rpms/spamass-milter/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26558/devel

Modified Files:
	.cvsignore sources 
Added Files:
	spamass-milter.spec 
Log Message:
auto-import spamass-milter-0.3.0-3 on branch devel from spamass-milter-0.3.0-3.src.rpm


--- NEW FILE spamass-milter.spec ---
Summary:        Sendmail milter for spamassassin
Name:           spamass-milter
Version:        0.3.0
Release:        3%{?dist}
License:        GPL
Group:          System Environment/Daemons
URL:            http://savannah.nongnu.org/projects/spamass-milt/

Source:         http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  spamassassin, sendmail-devel
Requires:       spamassassin, sendmail

Requires(pre):  %{_sbindir}/useradd
Requires(post): /sbin/chkconfig
Requires(post): /sbin/service
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service

%description
A Sendmail milter (Mail Filter) library that pipes all incoming mail
(including things received by rmail/UUCP) through the SpamAssassin,
a highly customizable spam filter.

%prep
%setup -q
%{__sed} -i -e 's local:/var/run/sendmail/spamass sock unix:/var/run/spamass-milter/spamass-milter.sock@' README

%{__cat} <<EOF >spamass-milter.sysconfig
### Override for your different local config
#SOCKET=%{_localstatedir}/run/spamass-milter/spamass-milter.sock

### Default parameters for spamass-milter are:
### -f (work in the background)
### -P %{_localstatedir}/run/spamass-milter.pid (PID file)
### you may add another parameters here, see spamass-milter(1)
#EXTRA_FLAGS="-m -r 15"
EOF

%{__cat} <<'EOF' >spamass-milter.sysv
#!/bin/bash
#
# Init file for Spamassassin sendmail milter.
#
# chkconfig: - 80 20
# description: spamass-milter is a daemon which hooks into sendmail and \
#              routes email messages to spamassassin
#
# processname: spamass-milter
# config: %{_sysconfdir}/sysconfig/spamass-milter
# pidfile: %{_localstatedir}/run/spamass-milter.pid

source %{_initrddir}/functions
source %{_sysconfdir}/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x %{_sbindir}/spamass-milter ] || exit 1

### Default variables
SOCKET="%{_localstatedir}/run/spamass-milter/spamass-milter.sock"
EXTRA_FLAGS="-m -r 15"
SYSCONFIG="%{_sysconfdir}/sysconfig/spamass-milter"

### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"

RETVAL=0
prog="spamass-milter"
desc="SpamAssassin milter"
pidfile=%{_localstatedir}/run/spamass-milter.pid

start() {
	echo -n $"Starting $desc ($prog): "
	touch $pidfile
	chown sa-milt:sa-milt $pidfile
	daemon --user sa-milt %{_sbindir}/$prog -p $SOCKET -P $pidfile -f $EXTRA_FLAGS
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/spamass-milter
	return $RETVAL
}

stop() {
	echo -n $"Shutting down $desc ($prog): "
	killproc $prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f $pidfile
	[ $RETVAL -eq 0 ] && rm -f %{_localstatedir}/lock/subsys/spamass-milter
	return $RETVAL
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  condrestart)
	[ -e %{_localstatedir}/lock/subsys/spamass-milter ] && restart
	RETVAL=$?
	;;
  status)
	status $prog
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
	RETVAL=1
esac

exit $RETVAL
EOF

%build
%configure
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%makeinstall

%{__install} -D -m0755 spamass-milter.sysv %{buildroot}%{_initrddir}/spamass-milter
%{__install} -D -m0644 spamass-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/spamass-milter
%{__install} -d -m0700 %{buildroot}%{_localstatedir}/run/spamass-milter

%pre
%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/run/spamass-milter \
	-c "SpamAssassin Milter" sa-milt &>/dev/null || :

%post
/sbin/chkconfig --add spamass-milter || :

%preun
if [ $1 -eq 0 ]; then
    /sbin/service spamass-milter stop &>/dev/null || :
    /sbin/chkconfig --del spamass-milter || :
fi

%postun
/sbin/service spamass-milter condrestart &>/dev/null || :

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog NEWS README
%doc %{_mandir}/man1/spamass-milter.1*
%config(noreplace) %{_sysconfdir}/sysconfig/spamass-milter
%{_initrddir}/spamass-milter
%{_sbindir}/spamass-milter
%dir %attr(-,sa-milt,sa-milt) %{_localstatedir}/run/spamass-milter

%changelog
* Mon Jun 06 2005 Paul Howarth <paul city-fan org> - 0.3.0-3%{?dist}
- Use Extras standard buildroot
- Unpack tarball quietly
- Create account sa-milt and run the milter using that instead of root
- Fix socket name in README
- Initscript not %%config

* Sun Jun 05 2005 Warren Togami <wtogami redhat com> - 0.3.0-2
- Extras

* Tue Feb 08 2005 Dag Wieers <dag wieers com> - 0.3.0-1
- Updated to release 0.3.0.

* Wed Sep 01 2004 Dag Wieers <dag wieers com> - 0.2.0-1
- Fixed variables in sysconfig file. (mator)

* Tue Feb 17 2004 Dag Wieers <dag wieers com> - 0.2.0-0
- Initial package. (using DAR)


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/spamass-milter/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	11 Jun 2005 09:12:55 -0000	1.1
+++ .cvsignore	11 Jun 2005 09:13:56 -0000	1.2
@@ -0,0 +1 @@
+spamass-milter-0.3.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/spamass-milter/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	11 Jun 2005 09:12:55 -0000	1.1
+++ sources	11 Jun 2005 09:13:56 -0000	1.2
@@ -0,0 +1 @@
+ced600331a0df7609fdbdf0e6d0eb943  spamass-milter-0.3.0.tar.gz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]