Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

snf-server.spec.in 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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): /usr/sbin/useradd
  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. # Reload the daemons if the systemctl command exists.
  73. if command -v /usr/bin/systemctl > /dev/null 2>&1; then
  74. /usr/bin/systemctl --system daemon-reload
  75. fi
  76. # Start the service.
  77. /sbin/service snf-server start
  78. %preun
  79. # Stop the service if it is running.
  80. /sbin/service snf-server status | grep running > /dev/null 2>&1
  81. if [ $? == 0 ]; then
  82. /sbin/service snf-server stop
  83. fi
  84. # Remove the service.
  85. /sbin/chkconfig --del snf-server
  86. # Reload the daemons if the systemctl command exists.
  87. if command -v /usr/bin/systemctl > /dev/null 2>&1; then
  88. /usr/bin/systemctl --system daemon-reload
  89. fi
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT
  92. %files
  93. %defattr(-,root,root)
  94. %{_sbindir}/SNF2Check
  95. %{_sbindir}/SNFClient
  96. %{_sbindir}/getRulebase.sample
  97. %{_sbindir}/SNFServer
  98. %{_sbindir}/SNFDebugServer
  99. %{_sbindir}/SNFServerConfig
  100. %{_sbindir}/SNFDebugServerConfig
  101. %{_sbindir}/snfSniffer.sample
  102. %{_sbindir}/snfSnifferFilter.sample
  103. %{_sbindir}/snfscan-standalone.sample
  104. %doc %{_datadir}/doc/snf-server/COPYING
  105. %doc %{_datadir}/doc/snf-server/INSTALL
  106. %doc %{_datadir}/doc/snf-server/BUGS
  107. %doc %{_datadir}/doc/snf-server/TODO
  108. %doc %{_datadir}/doc/snf-server/ChangeLog
  109. %doc %{_datadir}/doc/snf-server/README
  110. %doc %{_datadir}/doc/snf-server/DebugMode_readme.txt
  111. %doc %{_datadir}/doc/snf-server/SNFClient_readme.txt
  112. %doc %{_datadir}/doc/snf-server/SNFServer_readme.txt
  113. %doc %{_datadir}/doc/snf-server/snf_xci.xml
  114. %{_sysconfdir}/init.d/snf-server
  115. %defattr(-,snfuser,snfuser)
  116. %dir %{_datadir}/@PACKAGE_NAME@
  117. %{_datadir}/@PACKAGE_NAME@/junkmsg.txt
  118. %{_datadir}/@PACKAGE_NAME@/cleanmsg.txt
  119. %{_datadir}/@PACKAGE_NAME@/testmode.snf
  120. %{_datadir}/@PACKAGE_NAME@/GBUdbIgnoreList.txt.sample
  121. %dir %{_sysconfdir}/@PACKAGE_NAME@
  122. %config %{_sysconfdir}/@PACKAGE_NAME@/SNFServer.xml.sample
  123. %config %{_sysconfdir}/@PACKAGE_NAME@/identity.xml.sample
  124. %changelog
  125. * Sat Jan 05 2013 Alban Deniz - 3.0.14-1
  126. - Initial version, copied from snf-milter.spec.