diff options
author | Andrew Lewis <nerf@judo.za.org> | 2015-03-11 21:45:06 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2015-03-11 21:51:24 +0200 |
commit | 7902438bfdb8ec624e58e1b8daca8de1fa26f231 (patch) | |
tree | bbd6456eae3a1bb5dd5283e0a0af141c86560bef /centos | |
parent | 7fcaf66165072c1916d4dcddeb3b4d049370c426 (diff) | |
download | rspamd-7902438bfdb8ec624e58e1b8daca8de1fa26f231.tar.gz rspamd-7902438bfdb8ec624e58e1b8daca8de1fa26f231.zip |
Fix RPM packaging properly
Diffstat (limited to 'centos')
-rw-r--r-- | centos/rspamd.spec | 16 | ||||
-rw-r--r-- | centos/sources/rspamd.service | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/centos/rspamd.spec b/centos/rspamd.spec index 462bc22f8..de6054ef6 100644 --- a/centos/rspamd.spec +++ b/centos/rspamd.spec @@ -6,8 +6,6 @@ %define rspamd_pluginsdir %{_datadir}/rspamd %define rspamd_wwwdir %{_datadir}/rspamd/www -%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d} - %if 0%{?suse_version} %define __cmake cmake %define __install install @@ -58,7 +56,7 @@ Source0: https://rspamd.com/downloads/%{name}-%{version}.tar.xz Source1: %{name}.init Source2: %{name}.logrotate %else -Source5: tmpfiles.d +Source3: %{name}.service %endif %description @@ -100,8 +98,7 @@ lua. %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir} %else -%{__install} -d -m 0755 %{buildroot}%{_tmpfilesdir} -%{__install} -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf +%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %endif %{__install} -d -p -m 0755 %{buildroot}%{rspamd_home} @@ -127,10 +124,8 @@ rm -rf %{buildroot} %systemd_post %{name}.service %systemd_post %{name}.socket %endif -%if %{undefined suse_version} && %{undefined fedora} && 0%{?rhel} < 7 +%if 0%{?el6} /sbin/chkconfig --add %{name} -%else -systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf %endif %preun @@ -170,9 +165,8 @@ fi %if 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket -%dir %{_tmpfilesdir} -%{_tmpfilesdir}/%{name}.conf -%else +%endif +%if 0%{?el6} %{_initrddir}/%{name} %dir %{_localstatedir}/run/rspamd %endif diff --git a/centos/sources/rspamd.service b/centos/sources/rspamd.service new file mode 100644 index 000000000..14545569a --- /dev/null +++ b/centos/sources/rspamd.service @@ -0,0 +1,6 @@ +[Unit] +Description=rapid spam filtering system +After=nss-lookup.target + +[Service] +ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f -u _rspamd -g _rspamd |