您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

snf-server.spec.in 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #
  2. # $Id$
  3. #
  4. # $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $
  5. #
  6. # autoconf input for the MicroNeil @PACKAGE_NAME@ distribution.
  7. #
  8. # Author: Alban Deniz
  9. #
  10. # Copyright (C) 2012 ARM Research Labs, LLC.
  11. # See www.armresearch.com for the copyright terms.
  12. #
  13. #############################################################################
  14. # Look for sources in this directory.
  15. %define _sourcedir @abs_srcdir@/
  16. # Build in this directory
  17. %define _builddir @abs_srcdir@/
  18. # Create the source RPM in this directory.
  19. %define _srcrpmdir @abs_srcdir@/
  20. # Create the binary RPM in this directory.
  21. %define _rpmdir @abs_srcdir@/
  22. # Test install in this directory.
  23. BuildRoot: @abs_srcdir@/scratch/
  24. # Required items.
  25. Name: @PACKAGE_NAME@
  26. Version: @VERSION@
  27. Release: 1
  28. License: Artistic
  29. Group: System Environment/Daemons
  30. Summary: ARM Research Labs Sniffer.
  31. %define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest
  32. # Optional items.
  33. Vendor: ARM Research Labs, Inc.
  34. URL: http://www.armresearch.com/
  35. # Source.
  36. Source: @PACKAGE_NAME@-@VERSION@.tar.gz
  37. # Dependencies.
  38. Requires(pre): shadow-utils
  39. Requires: curl
  40. BuildRequires: curl
  41. Provides: snf-engine
  42. %description
  43. @PACKAGE_NAME@ is a plug-in for an MTA (Mail Transport Agent, such as
  44. sendmail or postfix) that does spam detection and IP address scanning.
  45. @PACKAGE_NAME@ must be configured after installation to work with an
  46. MTA.
  47. %group Applications/Communications
  48. %prep
  49. %setup -q -n @PACKAGE_NAME@-@VERSION@
  50. %build
  51. %configure \
  52. --enable-os-type=@SNF_OSTYPE@ \
  53. --sysconfdir=/etc \
  54. --prefix=/usr
  55. make
  56. %pre
  57. # Create the snfuser user and group.
  58. getent group snfuser > /dev/null || /usr/sbin/groupadd -r snfuser
  59. getent passwd snfuser > /dev/null || \
  60. /usr/sbin/useradd -r -g snfuser -s /sbin/nologin \
  61. -c "Sniffer Account" snfuser
  62. exit 0
  63. %install
  64. rm -rf %{buildroot}
  65. make DESTDIR=%{buildroot} install
  66. %post
  67. # Configure with testmode rulebase, no integration.
  68. /usr/sbin/SNFServerConfig -setup
  69. # Add the SFServer service.
  70. /sbin/chkconfig --add snf-server
  71. /sbin/chkconfig snf-server on
  72. # Start the service.
  73. /sbin/service snf-server start
  74. %preun
  75. # Stop the service if it is running.
  76. /sbin/service snf-server status | grep running > /dev/null 2>&1
  77. if [ $? == 0 ]; then
  78. /sbin/service snf-server stop
  79. fi
  80. # Remove the service.
  81. /sbin/chkconfig --del snf-server
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT
  84. %files
  85. %defattr(-,root,root)
  86. %{_sbindir}/SNF2Check
  87. %{_sbindir}/SNFClient
  88. %{_sbindir}/getRulebase.sample
  89. %{_sbindir}/SNFServer
  90. %{_sbindir}/SNFDebugServer
  91. %{_sbindir}/SNFServerConfig
  92. %{_sbindir}/SNFDebugServerConfig
  93. %{_sbindir}/snfSniffer.sample
  94. %{_sbindir}/snfSnifferFilter.sample
  95. %{_sbindir}/snfscan-standalone.sample
  96. %doc %{_datadir}/doc/snf-server/COPYING
  97. %doc %{_datadir}/doc/snf-server/INSTALL
  98. %doc %{_datadir}/doc/snf-server/BUGS
  99. %doc %{_datadir}/doc/snf-server/TODO
  100. %doc %{_datadir}/doc/snf-server/ChangeLog
  101. %doc %{_datadir}/doc/snf-server/README
  102. %doc %{_datadir}/doc/snf-server/DebugMode_readme.txt
  103. %doc %{_datadir}/doc/snf-server/SNFClient_readme.txt
  104. %doc %{_datadir}/doc/snf-server/SNFServer_readme.txt
  105. %doc %{_datadir}/doc/snf-server/snf_xci.xml
  106. %{_sysconfdir}/init.d/snf-server
  107. %defattr(-,snfuser,snfuser)
  108. %dir %{_datadir}/@PACKAGE_NAME@
  109. %{_datadir}/@PACKAGE_NAME@/junkmsg.txt
  110. %{_datadir}/@PACKAGE_NAME@/cleanmsg.txt
  111. %{_datadir}/@PACKAGE_NAME@/testmode.snf
  112. %{_datadir}/@PACKAGE_NAME@/GBUdbIgnoreList.txt.sample
  113. %{_datadir}/@PACKAGE_NAME@/SNF4SA/README
  114. %{_datadir}/@PACKAGE_NAME@/SNF4SA/INSTALL
  115. %{_datadir}/@PACKAGE_NAME@/SNF4SA/snf4sa.cf
  116. %{_datadir}/@PACKAGE_NAME@/SNF4SA/snf4sa.pm
  117. %dir %{_sysconfdir}/@PACKAGE_NAME@
  118. %config %{_sysconfdir}/@PACKAGE_NAME@/SNFServer.xml.sample
  119. %config %{_sysconfdir}/@PACKAGE_NAME@/identity.xml.sample
  120. %changelog
  121. * Sat Jan 05 2013 Alban Deniz - 3.0.14-1
  122. - Initial version, copied from snf-milter.spec.