Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

snf-server.spec.in 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 SNF milter
  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(post): chkconfig,initscripts
  40. Requires(preun):initscripts,chkconfig
  41. Requires: curl
  42. BuildRequires: curl
  43. Provides: snf-engine
  44. %description
  45. @PACKAGE_NAME@ is a plug-in for an MTA (Mail Transport Agent, such as
  46. sendmail or postfix) that does spam detection and IP address scanning.
  47. @PACKAGE_NAME@ must be configured after installation to work with an
  48. MTA.
  49. %group Applications/Communications
  50. %prep
  51. %setup -q -n @PACKAGE_NAME@-@VERSION@
  52. %build
  53. %configure \
  54. --enable-os-type=@SNF_OSTYPE@ \
  55. --sysconfdir=/etc \
  56. --prefix=/usr
  57. make
  58. %pre
  59. # Create the snfuser user and group.
  60. getent group snfuser > /dev/null || /usr/sbin/groupadd -r snfuser
  61. getent passwd snfuser > /dev/null || \
  62. /usr/sbin/useradd -r -g snfuser -s /sbin/nologin \
  63. -c "Sniffer Account" snfuser
  64. exit 0
  65. %install
  66. rm -rf %{buildroot}
  67. make DESTDIR=%{buildroot} install
  68. %post
  69. # Configure with testmode rulebase, no integration.
  70. /usr/sbin/SNFServerConfig -setup
  71. # Add the SFServer service.
  72. /sbin/chkconfig --add snf-server
  73. /sbin/chkconfig snf-server on
  74. # Start the service.
  75. /sbin/service snf-server start
  76. %preun
  77. # Stop the service if it is running.
  78. /sbin/service snf-server status | grep running > /dev/null 2>&1
  79. if [ $? == 0 ]; then
  80. /sbin/service snf-server stop
  81. fi
  82. # Remove the service.
  83. /sbin/chkconfig --del snf-server
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT
  86. %files
  87. %defattr(-,root,root)
  88. %{_sbindir}/SNF2Check
  89. %{_sbindir}/SNFClient
  90. %{_sbindir}/getRulebase.sample
  91. %{_sbindir}/SNFServer
  92. %{_sbindir}/SNFDebugServer
  93. %{_sbindir}/SNFServerConfig
  94. %{_sbindir}/SNFDebugServerConfig
  95. %doc %{_datadir}/doc/snf-server/COPYING
  96. %doc %{_datadir}/doc/snf-server/INSTALL
  97. %doc %{_datadir}/doc/snf-server/BUGS
  98. %doc %{_datadir}/doc/snf-server/TODO
  99. %doc %{_datadir}/doc/snf-server/ChangeLog
  100. %doc %{_datadir}/doc/snf-server/README
  101. %{_sysconfdir}/init.d/snf-server
  102. %defattr(-,snfuser,snfuser)
  103. %dir %{_datadir}/@PACKAGE_NAME@
  104. %{_datadir}/@PACKAGE_NAME@/junkmsg.txt
  105. %{_datadir}/@PACKAGE_NAME@/cleanmsg.txt
  106. %{_datadir}/@PACKAGE_NAME@/testmode.snf
  107. %{_datadir}/@PACKAGE_NAME@/GBUdbIgnoreList.txt.sample
  108. %dir %{_sysconfdir}/@PACKAGE_NAME@
  109. %config %{_sysconfdir}/@PACKAGE_NAME@/SNFServer.xml.sample
  110. %config %{_sysconfdir}/@PACKAGE_NAME@/identity.xml.sample
  111. %changelog
  112. * Sat Jan 05 2013 Alban Deniz - 3.0.14-1
  113. - Initial version, copied from snf-milter.spec.