Accepting request 205977 from server:mail
- Add systemd support for openSUSE > 12.2 - Remove some obsolete conditionnal macros OBS-URL: https://build.opensuse.org/request/show/205977 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/exim?expand=0&rev=25
This commit is contained in:
commit
40b5ffc990
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 27 17:35:43 UTC 2013 - p.drouand@gmail.com
|
||||
|
||||
- Add systemd support for openSUSE > 12.2
|
||||
- Remove some obsolete conditionnal macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 16 02:13:52 UTC 2013 - jengelh@inai.de
|
||||
|
||||
|
14
exim.service
Normal file
14
exim.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Exim Mail Transport Agent
|
||||
After=network.target
|
||||
Conflicts=sendmail.service postfix.service
|
||||
|
||||
[Service]
|
||||
PrivateTmp=true
|
||||
Environment=QUEUE=1h
|
||||
EnvironmentFile=-/etc/sysconfig/exim
|
||||
ExecStartPre=-/usr/libexec/exim-gen-cert
|
||||
ExecStart=/usr/sbin/exim -bd -q${QUEUE}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
56
exim.spec
56
exim.spec
@ -24,13 +24,8 @@ BuildRequires: openldap2-devel
|
||||
BuildRequires: pcre-devel
|
||||
%if %{?suse_version:1}%{?!suse_version:0}
|
||||
BuildRequires: tcpd-devel
|
||||
%if %suse_version > 910
|
||||
BuildRequires: xorg-x11-devel
|
||||
%else
|
||||
BuildRequires: XFree86-devel
|
||||
BuildRequires: XFree86-libs
|
||||
%endif
|
||||
%else
|
||||
BuildRequires: libXaw-devel
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libXt-devel
|
||||
@ -43,7 +38,15 @@ Conflicts: sendmail sendmail-tls postfix
|
||||
Provides: smtp_daemon
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:0} > 800
|
||||
Requires: logrotate
|
||||
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd fileutils textutils
|
||||
%if 0%{?suse_version} > 1220
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
Requires(pre): %insserv_prereq
|
||||
%endif
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
Requires(pre): fileutils textutils
|
||||
%endif
|
||||
Version: 4.80.1
|
||||
Release: 0
|
||||
@ -68,6 +71,7 @@ Source13: apparmor.usr.sbin.exim
|
||||
Source20: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/exim4-manpages.tar.bz2
|
||||
Source30: eximstats-html-update.py
|
||||
Source31: eximstats.conf
|
||||
Source32: exim.service
|
||||
Patch: exim-tail.patch
|
||||
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
|
||||
|
||||
@ -244,7 +248,11 @@ rm -f doc/*.{orig,txt~}
|
||||
make
|
||||
|
||||
%install
|
||||
%if 0%{?suse_version} > 1220
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
%else
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
%endif
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/{bin,sbin,lib}
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/exim
|
||||
@ -258,7 +266,11 @@ make inst_dest=$RPM_BUILD_ROOT/usr/sbin \
|
||||
INSTALL_ARG=-no_chown install
|
||||
mv $RPM_BUILD_ROOT/usr/sbin/exim-%{version}* $RPM_BUILD_ROOT/usr/sbin/exim
|
||||
mv $RPM_BUILD_ROOT/etc/exim/exim.conf src/configure.default # with all substitutions done
|
||||
%if 0%{?suse_version} > 1220
|
||||
install -m 755 %{S:32} $RPM_BUILD_ROOT/%{_unitdir}/exim.service
|
||||
%else
|
||||
install -m 755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/exim
|
||||
%endif
|
||||
# aka...
|
||||
for i in \
|
||||
/usr/lib/sendmail \
|
||||
@ -270,7 +282,11 @@ do
|
||||
ln -sf ../sbin/exim $RPM_BUILD_ROOT$i
|
||||
done
|
||||
ln -sf exim $RPM_BUILD_ROOT/usr/sbin/sendmail
|
||||
%if 0%{?suse_version} > 1220
|
||||
ln -sv ../../%{_unitdir}/exim.service $RPM_BUILD_ROOT/usr/sbin/rcexim
|
||||
%else
|
||||
ln -sv ../../etc/init.d/exim $RPM_BUILD_ROOT/usr/sbin/rcexim
|
||||
%endif
|
||||
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
|
||||
mv $RPM_BUILD_ROOT/usr/sbin/eximon* $RPM_BUILD_ROOT/usr/bin/
|
||||
%else
|
||||
@ -305,11 +321,6 @@ gzip -9 doc/*.txt
|
||||
# package the utilities without executable permissions, to silence rpmlint warnings
|
||||
chmod 644 util/*.{pl,sh} src/convert4r*
|
||||
#
|
||||
# since 10.0, the permissions file is packaged in the 'permissions' package
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:99999} < 1000
|
||||
install -m 0755 -d $RPM_BUILD_ROOT/etc/permissions.d
|
||||
install -m 0644 $RPM_SOURCE_DIR/permissions.exim $RPM_BUILD_ROOT/etc/permissions.d/exim
|
||||
%endif
|
||||
# eximstats-html files
|
||||
%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0
|
||||
mkdir -p $RPM_BUILD_ROOT/srv/www/eximstats
|
||||
@ -339,24 +350,35 @@ fi
|
||||
for i in var/log/exim/main.log var/log/exim/panic.log var/log/exim/reject.log; do
|
||||
if ! test -e $i; then touch $i; chown mail:mail $i; chmod 640 $i ; fi
|
||||
done
|
||||
%if 0%{?suse_version} > 1220
|
||||
%{fillup_only}
|
||||
%service_add_post exim.service
|
||||
%else
|
||||
%{fillup_and_insserv exim}
|
||||
%endif
|
||||
exit 0
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:0} > 820
|
||||
%if %{?suse_version:%suse_version}
|
||||
|
||||
%preun
|
||||
%if 0%{?suse_version} > 1220
|
||||
%service_del_preun exim.service
|
||||
%else
|
||||
%stop_on_removal exim
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:0} > 820
|
||||
%if %{?suse_version:%suse_version}
|
||||
%if 0%{?suse_version} > 1220
|
||||
%service_del_postun exim.service
|
||||
%else
|
||||
%restart_on_update exim
|
||||
%endif
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
%verifyscript
|
||||
%verify_permissions -e /usr/sbin/exim
|
||||
|
||||
%clean
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc ACKNOWLEDGMENTS CHANGES LICENCE NOTICE README.UPDATING README
|
||||
@ -376,7 +398,11 @@ exit 0
|
||||
/usr/sbin/exiqsumm
|
||||
/usr/sbin/exiwhat
|
||||
%dir /etc/exim
|
||||
%if 0%{?suse_version} > 1220
|
||||
%{_unitdir}/exim.service
|
||||
%else
|
||||
%config /etc/init.d/exim
|
||||
%endif
|
||||
%config(noreplace) /etc/logrotate.d/exim
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:99999} < 1000
|
||||
%config(noreplace) /etc/permissions.d/exim
|
||||
|
Loading…
x
Reference in New Issue
Block a user