git-svn-id: https://svn.microneil.com/svn/PKG-SNF-CS-NIX/trunk@73 233e721a-07f6-49eb-a7da-05e0e16828fcmaster
@@ -59,6 +59,7 @@ You must specify a valid OS type with --enable-os-type=TYPE, where TYPE is one o | |||
ArchLinux]) | |||
;; | |||
esac | |||
AC_SUBST(SNF_OSTYPE) | |||
AM_CONDITIONAL([OpenBSD], [test x$SNF_OSTYPE = xOpenBSD]) | |||
AM_CONDITIONAL([FreeBSD], [test x$SNF_OSTYPE = xFreeBSD]) | |||
AM_CONDITIONAL([Suse], [test x$SNF_OSTYPE = xSuse]) | |||
@@ -101,6 +102,9 @@ dnl Output the makefiles. | |||
dnl | |||
AC_OUTPUT([Makefile | |||
${PACKAGE_NAME}.spec | |||
${PACKAGE_NAME}-postfix.spec | |||
${PACKAGE_NAME}-sendmail.spec | |||
CodeDweller/Makefile | |||
SNFMulti/Makefile | |||
SNFServer/Makefile |
@@ -0,0 +1,63 @@ | |||
# | |||
# $Id$ | |||
# | |||
# $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $ | |||
# | |||
# autoconf input for the MicroNeil @PACKAGE_NAME@-postfix RPM spec file. | |||
# | |||
# Author: Alban Deniz | |||
# | |||
# Copyright (C) 2012 ARM Research Labs, LLC. | |||
# See www.armresearch.com for the copyright terms. | |||
# | |||
############################################################################# | |||
# Create the source RPM in this directory. | |||
%define _srcrpmdir @abs_srcdir@/ | |||
# Create the binary RPM in this directory. | |||
%define _rpmdir @abs_srcdir@/ | |||
# Test install in this directory. | |||
BuildRoot: @abs_srcdir@/scratch/ | |||
# Required items. | |||
Name: @PACKAGE_NAME@-postfix | |||
Version: @VERSION@ | |||
Release: 1 | |||
License: Artistic | |||
Group: System Environment/Daemons | |||
BuildArch: noarch | |||
Summary: ARM Research Labs SNF milter | |||
#%define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest | |||
# Optional items. | |||
Vendor: ARM Research Labs, Inc. | |||
URL: http://www.armresearch.com/ | |||
Requires: snf-milter | |||
Requires: postfix | |||
%description | |||
@PACKAGE_NAME@-postfix integrates snf-milter with postfix. snf-milter | |||
is a plug-in for an MTA (Mail Transport Agent, such as sendmail or | |||
postfix) that does spam detection and IP address scanning. | |||
@PACKAGE_NAME@-postfix must be installed after @PACKAGE_NAME@. | |||
%group Applications/Communications | |||
%post | |||
# Integrate with postfix. | |||
/usr/sbin/SNFMilterConfig -with=postfix | |||
%preun | |||
# Remove configuration with postfix. | |||
/usr/sbin/SNFMilterConfig -with=none | |||
%files | |||
%defattr(-,root,root) | |||
%changelog | |||
* Sat Sep 22 2012 Alban Deniz - 1.0.4-1 | |||
- Initial version |
@@ -0,0 +1,63 @@ | |||
# | |||
# $Id$ | |||
# | |||
# $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $ | |||
# | |||
# autoconf input for the MicroNeil @PACKAGE_NAME@-sendmail RPM spec file. | |||
# | |||
# Author: Alban Deniz | |||
# | |||
# Copyright (C) 2012 ARM Research Labs, LLC. | |||
# See www.armresearch.com for the copyright terms. | |||
# | |||
############################################################################# | |||
# Create the source RPM in this directory. | |||
%define _srcrpmdir @abs_srcdir@/ | |||
# Create the binary RPM in this directory. | |||
%define _rpmdir @abs_srcdir@/ | |||
# Test install in this directory. | |||
BuildRoot: @abs_srcdir@/scratch/ | |||
# Required items. | |||
Name: @PACKAGE_NAME@-sendmail | |||
Version: @VERSION@ | |||
Release: 1 | |||
License: Artistic | |||
Group: System Environment/Daemons | |||
BuildArch: noarch | |||
Summary: ARM Research Labs SNF milter | |||
#%define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest | |||
# Optional items. | |||
Vendor: ARM Research Labs, Inc. | |||
URL: http://www.armresearch.com/ | |||
Requires: snf-milter | |||
Requires: sendmail | |||
%description | |||
@PACKAGE_NAME@-sendmail integrates snf-milter with sendmail. snf-milter | |||
is a plug-in for an MTA (Mail Transport Agent, such as sendmail or | |||
postfix) that does spam detection and IP address scanning. | |||
@PACKAGE_NAME@-sendmail must be installed after @PACKAGE_NAME@. | |||
%group Applications/Communications | |||
%post | |||
# Integrate with sendmail. | |||
/usr/sbin/SNFMilterConfig -with=sendmail | |||
%preun | |||
# Remove configuration with sendmail. | |||
/usr/sbin/SNFMilterConfig -with=none | |||
%files | |||
%defattr(-,root,root) | |||
%changelog | |||
* Sat Sep 22 2012 Alban Deniz - 1.0.4-1 | |||
- Initial version |
@@ -0,0 +1,147 @@ | |||
# | |||
# $Id$ | |||
# | |||
# $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $ | |||
# | |||
# autoconf input for the MicroNeil @PACKAGE_NAME@ distribution. | |||
# | |||
# Author: Alban Deniz | |||
# | |||
# Copyright (C) 2012 ARM Research Labs, LLC. | |||
# See www.armresearch.com for the copyright terms. | |||
# | |||
############################################################################# | |||
# Look for sources in this directory. | |||
%define _sourcedir @abs_srcdir@/ | |||
# Build in this directory | |||
%define _builddir @abs_srcdir@/ | |||
# Create the source RPM in this directory. | |||
%define _srcrpmdir @abs_srcdir@/ | |||
# Create the binary RPM in this directory. | |||
%define _rpmdir @abs_srcdir@/ | |||
# Test install in this directory. | |||
BuildRoot: @abs_srcdir@/scratch/ | |||
# Required items. | |||
Name: @PACKAGE_NAME@ | |||
Version: @VERSION@ | |||
Release: 1 | |||
License: Artistic | |||
Group: System Environment/Daemons | |||
Summary: ARM Research Labs SNF milter | |||
%define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest | |||
# Optional items. | |||
Vendor: ARM Research Labs, Inc. | |||
URL: http://www.armresearch.com/ | |||
# Source. | |||
Source: @PACKAGE_NAME@-@VERSION@.tar.gz | |||
# Dependencies. | |||
Requires(pre): shadow-utils | |||
Requires(post): chkconfig,initscripts | |||
Requires(preun):initscripts,chkconfig | |||
Requires: curl | |||
BuildRequires: curl | |||
Provides: snf-engine | |||
%description | |||
@PACKAGE_NAME@ is a plug-in for an MTA (Mail Transport Agent, such as | |||
sendmail or postfix) that does spam detection and IP address scanning. | |||
@PACKAGE_NAME@ must be configured after installation to work with an | |||
MTA. | |||
%group Applications/Communications | |||
%prep | |||
%setup -q -n @PACKAGE_NAME@-@VERSION@ | |||
%build | |||
%configure \ | |||
--enable-os-type=@SNF_OSTYPE@ \ | |||
--sysconfdir=/etc \ | |||
--prefix=/usr | |||
make | |||
%pre | |||
# Create the snfuser user and group. | |||
getent group snfuser > /dev/null || /usr/sbin/groupadd -r snfuser | |||
getent passwd snfuser > /dev/null || \ | |||
/usr/sbin/useradd -r -g snfuser -s /sbin/nologin \ | |||
-c "Sniffer Account" snfuser | |||
exit 0 | |||
%install | |||
rm -rf %{buildroot} | |||
make DESTDIR=%{buildroot} install | |||
%post | |||
# Configure with testmode rulebase, no integration. | |||
/usr/sbin/SNFServerConfig -setup | |||
# Add the SFServer service. | |||
/sbin/chkconfig --add snf-server | |||
/sbin/chkconfig snf-server on | |||
# Start the service. | |||
/sbin/service snf-server start | |||
%preun | |||
# Stop the service if it is running. | |||
/sbin/service snf-server status | grep running > /dev/null 2>&1 | |||
if [ $? == 0 ]; then | |||
/sbin/service snf-server stop | |||
fi | |||
# Remove the service. | |||
/sbin/chkconfig --del snf-server | |||
%clean | |||
rm -rf $RPM_BUILD_ROOT | |||
%files | |||
%defattr(-,root,root) | |||
%{_sbindir}/SNF2Check | |||
%{_sbindir}/SNFClient | |||
%{_sbindir}/getRulebase.sample | |||
%{_sbindir}/SNFServer | |||
%{_sbindir}/SNFDebugServer | |||
%{_sbindir}/SNFServerConfig | |||
%{_sbindir}/SNFDebugServerConfig | |||
%doc %{_datadir}/doc/snf-server/COPYING | |||
%doc %{_datadir}/doc/snf-server/INSTALL | |||
%doc %{_datadir}/doc/snf-server/BUGS | |||
%doc %{_datadir}/doc/snf-server/TODO | |||
%doc %{_datadir}/doc/snf-server/ChangeLog | |||
%doc %{_datadir}/doc/snf-server/README | |||
%{_sysconfdir}/init.d/snf-server | |||
%defattr(-,snfuser,snfuser) | |||
%dir %{_datadir}/@PACKAGE_NAME@ | |||
%{_datadir}/@PACKAGE_NAME@/junkmsg.txt | |||
%{_datadir}/@PACKAGE_NAME@/cleanmsg.txt | |||
%{_datadir}/@PACKAGE_NAME@/testmode.snf | |||
%{_datadir}/@PACKAGE_NAME@/GBUdbIgnoreList.txt.sample | |||
%dir %{_sysconfdir}/@PACKAGE_NAME@ | |||
%config %{_sysconfdir}/@PACKAGE_NAME@/SNFServer.xml.sample | |||
%config %{_sysconfdir}/@PACKAGE_NAME@/identity.xml.sample | |||
%changelog | |||
* Sat Jan 05 2013 Alban Deniz - 3.0.14-1 | |||
- Initial version, copied from snf-milter.spec. |