Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

rspamd.spec 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. %define rspamd_user rspamd
  2. %define rspamd_group %{rspamd_user}
  3. %define rspamd_home %{_localstatedir}/lib/rspamd
  4. %define rspamd_logdir %{_localstatedir}/log/rspamd
  5. %define rspamd_confdir %{_sysconfdir}/rspamd
  6. Name: rspamd
  7. Version: 0.5.5
  8. Release: 1
  9. Summary: Rapid spam filtering system
  10. Group: System Environment/Daemons
  11. # BSD License (two clause)
  12. # http://www.freebsd.org/copyright/freebsd-license.html
  13. License: BSD
  14. URL: https://bitbucket.org/vstakhov/rspamd/
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
  16. BuildRequires: cmake,glib2-devel,gmime-devel,openssl-devel,lua-devel
  17. Requires: glib2,gmime,lua
  18. # for /user/sbin/useradd
  19. Requires(pre): shadow-utils
  20. Requires(post): chkconfig
  21. # for /sbin/service
  22. Requires(preun): chkconfig, initscripts
  23. Requires(postun): initscripts
  24. Source0: http://cdn.bitbucket.org/vstakhov/rspamd/downloads/%{name}-%{version}.tar.gz
  25. Source1: %{name}.init
  26. Source2: %{name}.logrotate
  27. Source3: %{name}.xml
  28. %description
  29. Rspamd is a rapid, modular and lightweight spam filter. It is designed to work
  30. with big amount of mail and can be easily extended with own filters written in
  31. lua.
  32. %prep
  33. %setup -q
  34. %build
  35. cmake %{_sourcedir} \
  36. -DETC_PREFIX=%{_sysconfdir}
  37. -DMAN_PREFIX=%{_mandir} \
  38. -DLOCALSTATES_PREFIX=%{_localstatedir}/lib \
  39. -DLIBDIR=%{_libdir} \
  40. -DINCLUDEDIR=%{_includedir} \
  41. -DNO_SHARED=ON \
  42. -DDEBIAN_BUILD=1 \
  43. -DRSPAMD_GROUP=%{rspamd_group} \
  44. -DRSPAMD_USER=%{rspamd_user}
  45. %{__make} %{?_smp_mflags}
  46. %install
  47. rm -rf %{buildroot}
  48. %{__make} install DESTDIR=%{buildroot} INSTALLDIRS=vendor
  49. %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
  50. %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  51. %clean
  52. rm -rf %{buildroot}
  53. %pre
  54. %{_sbindir}/useradd -c "Rspamd user" -s /bin/false -r -d %{rspamd_home} %{rspamd_user} 2>/dev/null || :
  55. %post
  56. /sbin/chkconfig --add %{name}
  57. %preun
  58. if [ $1 = 0 ]; then
  59. /sbin/service %{name} stop >/dev/null 2>&1
  60. /sbin/chkconfig --del %{name}
  61. fi
  62. %postun
  63. if [ $1 -ge 1 ]; then
  64. /sbin/service %{name} condrestart > /dev/null 2>&1 || :
  65. fi
  66. %files
  67. %defattr(-,root,root,-)
  68. %{_initrddir}/%{name}
  69. %{_mandir}/man8/%{name}.*
  70. %{_mandir}/man1/rspamc.*
  71. %{_bindir}/rspamd
  72. %{_bindir}/rspamc
  73. %dir %{rspamd_confdir}
  74. %config(noreplace) %{rspamd_confdir}/2tld.inc
  75. %config(noreplace) %{rspamd_confdir}/2tld.inc.orig
  76. %config(noreplace) %{rspamd_confdir}/surbl-whitelist.inc
  77. %config(noreplace) %{rspamd_confdir}/plugins/lua/forged_recipients.lua
  78. %config(noreplace) %{rspamd_confdir}/plugins/lua/maillist.lua
  79. %config(noreplace) %{rspamd_confdir}/plugins/lua/multimap.lua
  80. %config(noreplace) %{rspamd_confdir}/plugins/lua/once_received.lua
  81. %config(noreplace) %{rspamd_confdir}/plugins/lua/received_rbl.lua
  82. %config(noreplace) %{rspamd_confdir}/plugins/lua/ratelimit.lua
  83. %config(noreplace) %{rspamd_confdir}/plugins/lua/whitelist.lua
  84. %config(noreplace) %{rspamd_confdir}/plugins/lua/phishing.lua
  85. %config(noreplace) %{rspamd_confdir}/plugins/lua/trie.lua
  86. %config(noreplace) %{rspamd_confdir}/plugins/lua/emails.lua
  87. %config(noreplace) %{rspamd_confdir}/plugins/lua/ip_score.lua
  88. %config(noreplace) %{rspamd_confdir}/lua/regexp/drugs.lua
  89. %config(noreplace) %{rspamd_confdir}/lua/regexp/fraud.lua
  90. %config(noreplace) %{rspamd_confdir}/lua/regexp/headers.lua
  91. %config(noreplace) %{rspamd_confdir}/lua/regexp/lotto.lua
  92. %config(noreplace) %{rspamd_confdir}/lua/rspamd.lua
  93. %config(noreplace) %{rspamd_confdir}/lua/rspamd.classifiers.lua
  94. %changelog
  95. * Sat May 25 2013 Vsevolod Stakhov <vsevolod-at-highsecure.ru> 0.5.5-1
  96. - Initial spec version.