]> source.dussan.org Git - rspamd.git/commitdiff
Fix linux packages.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 19 Dec 2013 17:51:53 +0000 (17:51 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 19 Dec 2013 17:51:53 +0000 (17:51 +0000)
centos/rspamd.spec
centos/sources/rspamd.init
debian/compat
debian/control
debian/postrm
debian/preinst
debian/rules

index 938dc9f9fca115769953fa59e001195f62174ccb..7a1e1051c4b345db8c5ed9e0e2c57e00db472c27 100644 (file)
@@ -7,6 +7,12 @@
 
 %define USE_JUDY         0
 
+%if 0%{?suse_version}
+%define __cmake cmake
+%define __install install
+%define __make make
+%endif
+
 Name:           rspamd
 Version:        0.6.4
 Release:        1
@@ -18,19 +24,23 @@ Group:          System Environment/Daemons
 License:        BSD
 URL:            https://rspamd.com
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}
-%if USE_JUDY
-BuildRequires:  cmake,glib2-devel,gmime-devel,libevent-devel,openssl-devel,lua-devel,Judy-devel
+%if "%{USE_JUDY}" == "1"
+BuildRequires:  cmake,glib2-devel,gmime-devel,libevent-devel,openssl-devel,lua-devel,Judy-devel,pcre-devel
 Requires:       glib2,gmime,lua,Judy,libevent
 %else
-BuildRequires:  cmake,glib2-devel,gmime-devel,libevent-devel,openssl-devel,lua-devel
+BuildRequires:  cmake,glib2-devel,gmime-devel,libevent-devel,openssl-devel,lua-devel,pcre-devel
 Requires:       glib2,gmime,lua,libevent
 %endif
 # for /user/sbin/useradd
+%if 0%{?suse_version}
+Requires(pre):  shadow
+%else
 Requires(pre):  shadow-utils
 Requires(post): chkconfig
 # for /sbin/service
 Requires(preun):        chkconfig, initscripts
 Requires(postun):       initscripts
+%endif
 
 Source0:        http://cdn.bitbucket.org/vstakhov/rspamd/downloads/%{name}-%{version}.tar.gz
 Source1:        %{name}.init
@@ -61,7 +71,7 @@ rm -rf %{buildroot}
         -DDEBIAN_BUILD=1 \
         -DRSPAMD_GROUP=%{rspamd_group} \
         -DRSPAMD_USER=%{rspamd_user} \
-%if USE_JUDY
+%if "%{USE_JUDY}" == "1"
         -DENABLE_JUDY=ON
 %else
         -DENABLE_JUDY=OFF
@@ -75,13 +85,14 @@ rm -rf %{buildroot}
 %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
 %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 %{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
-%{__install} -o %{rspamd_user} -g %{rspamd_group} -d -p -m 0755 %{buildroot}%{rspamd_home}
 
 %clean
 rm -rf %{buildroot}
 
 %pre
-%{_sbindir}/useradd -c "Rspamd user" -s /bin/false -r -d %{rspamd_home} %{rspamd_user} 2>/dev/null || :
+%{_sbindir}/groupadd -r %{rspamd_group} 2>/dev/null || :
+%{_sbindir}/useradd -g %{rspamd_group} -c "Rspamd user" -s /bin/false -N -r -d %{rspamd_home} %{rspamd_user} 2>/dev/null || :
+%{__install} -o %{rspamd_user} -g %{rspamd_group} -d -p -m 0755 %{buildroot}%{rspamd_home}
 
 %post
 /sbin/chkconfig --add %{name}
@@ -114,8 +125,11 @@ fi
 %config(noreplace) %{rspamd_confdir}/workers.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 %dir %{rspamd_logdir}
+%dir %{rspamd_confdir}/lua/regexp
+%dir %{rspamd_confdir}/lua
 %dir %{rspamd_confdir}
-%attr(755, %{rspamd_user}, %{rspamd_group}) %dir %{rspamd_home}
+%dir %{rspamd_pluginsdir}/lua
+%dir %{rspamd_pluginsdir}
 %config(noreplace) %{rspamd_confdir}/2tld.inc
 %config(noreplace) %{rspamd_confdir}/surbl-whitelist.inc
 %config(noreplace) %{rspamd_pluginsdir}/lua/forged_recipients.lua
index 864b915b59e25e6875d0f671eb7f1a1abb0ab47a..78714a9358d4ea23ed02804739fec6354b8d66ce 100644 (file)
@@ -1,6 +1,15 @@
 #!/bin/sh
 #
 # rspamd - this script starts and stops the rspamd daemon
+### BEGIN INIT INFO
+# Provides:          rspamd
+# Required-Start:    $remote_fs $network
+# Required-Stop:     $network $remote_fs
+# Default-Start:     5
+# Default-Stop:
+# Short-Description: Rspamd daemon
+# Description:       Rspamd spam filtering daemon process
+### END INIT INFO
 #
 # chkconfig:   - 85 15 
 # description:  rspamd is a spam filtering system
index ec635144f60048986bc560c5576355344005e6e7..7f8f011eb73d6043d2e6db9d2c101195ae2801f2 100644 (file)
@@ -1 +1 @@
-9
+7
index 93b6de92631184e38e58169c949c626f98c5dc26..0611624c41bb4cae994fdf565bfc05b3e79dc870 100644 (file)
@@ -2,7 +2,7 @@ Source: rspamd
 Section: mail
 Priority: optional
 Maintainer: Vsevolod Stakhov <vsevolod@highsecure.ru>
-Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.2-dev, libpcre3-dev, cdbs, libssl-dev (>= 1.0), libjudy-dev, libcurl4-openssl-dev
+Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.2-dev | liblua5.1-dev | liblua5.1-0-dev, libpcre3-dev, cdbs, libssl-dev (>= 1.0), libcurl4-openssl-dev
 Standards-Version: 3.9.5
 Homepage: https://bitbucket.org/vstakhov/rspamd/
 Vcs-Hg: https://bitbucket.org/vstakhov/rspamd/
index d6910f0cc6ea7c332e5e1d5115be38da7d5d3f1e..14735e0a2433e224f7dadffc72231428db10fc5b 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # postrm script for rspamd
+#DEBHELPER#
 
 set -e
 
index 48d61b9791320ebe25c66b45e2fa98d49d6db63b..3588f2f5bd058b8814b0bc8b9e57277b3f0fee9f 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # preinst script for rspamd
+#DEBHELPER#
 
 set -e
 
index a08711f7a0c61947fe1e733d876e790543e9861f..ce09d5128b45b659b357b4a94ca897da506fb0fb 100755 (executable)
@@ -2,6 +2,8 @@
 
 #export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
+export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
+
 include /usr/share/dpkg/buildflags.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/cmake.mk