make spec work for epel5 and epel6
This commit is contained in:
parent
9ae5b6102c
commit
b68c74888c
16
dovecot.spec
16
dovecot.spec
@ -43,11 +43,16 @@ BuildRequires: krb5-devel
|
|||||||
Requires: openssl >= 0.9.7f-4
|
Requires: openssl >= 0.9.7f-4
|
||||||
|
|
||||||
# Package includes an initscript service file, needs to require initscripts package
|
# Package includes an initscript service file, needs to require initscripts package
|
||||||
Requires: initscripts
|
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(post): chkconfig shadow-utils
|
Requires(post): chkconfig shadow-utils
|
||||||
Requires(preun): shadow-utils chkconfig initscripts
|
Requires(preun): shadow-utils chkconfig initscripts
|
||||||
|
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
|
||||||
|
Requires: systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
%else
|
||||||
|
Requires: initscripts
|
||||||
Requires(postun): initscripts
|
Requires(postun): initscripts
|
||||||
|
%endif
|
||||||
|
|
||||||
%define ssldir %{_sysconfdir}/pki/%{name}
|
%define ssldir %{_sysconfdir}/pki/%{name}
|
||||||
|
|
||||||
@ -136,7 +141,7 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
#pigeonhole
|
#pigeonhole
|
||||||
pushd dovecot-2.0-pigeonhole-%{pigeonholever}
|
pushd dovecot-2.0-pigeonhole-%{pigeonholever}
|
||||||
autoreconf -fiv
|
#autoreconf -fiv
|
||||||
%configure \
|
%configure \
|
||||||
INSTALL_DATA="install -c -p -m644" \
|
INSTALL_DATA="install -c -p -m644" \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
@ -158,7 +163,6 @@ popd
|
|||||||
#move doc dir back to build dir so doc macro in files section can use it
|
#move doc dir back to build dir so doc macro in files section can use it
|
||||||
mv $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} %{_builddir}/%{name}-%{version}/docinstall
|
mv $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} %{_builddir}/%{name}-%{version}/docinstall
|
||||||
|
|
||||||
install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/dovecot
|
|
||||||
|
|
||||||
%if %{?fedora}00%{?rhel} < 6
|
%if %{?fedora}00%{?rhel} < 6
|
||||||
sed -i 's|password-auth|system-auth|' %{SOURCE2}
|
sed -i 's|password-auth|system-auth|' %{SOURCE2}
|
||||||
@ -181,6 +185,8 @@ chmod 600 $RPM_BUILD_ROOT%{ssldir}/private/dovecot.pem
|
|||||||
|
|
||||||
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
|
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
|
||||||
install -p -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/dovecot.conf
|
install -p -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/dovecot.conf
|
||||||
|
%else
|
||||||
|
install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/dovecot
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/run/dovecot/{login,empty}
|
mkdir -p $RPM_BUILD_ROOT/var/run/dovecot/{login,empty}
|
||||||
@ -288,6 +294,8 @@ make check
|
|||||||
%config(noreplace) %{_sysconfdir}/tmpfiles.d/dovecot.conf
|
%config(noreplace) %{_sysconfdir}/tmpfiles.d/dovecot.conf
|
||||||
/lib/systemd/system/dovecot.service
|
/lib/systemd/system/dovecot.service
|
||||||
/lib/systemd/system/dovecot.socket
|
/lib/systemd/system/dovecot.socket
|
||||||
|
%else
|
||||||
|
%{_initddir}/dovecot
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%dir %{_sysconfdir}/dovecot
|
%dir %{_sysconfdir}/dovecot
|
||||||
@ -321,8 +329,6 @@ make check
|
|||||||
%config(noreplace) %{_sysconfdir}/pam.d/dovecot
|
%config(noreplace) %{_sysconfdir}/pam.d/dovecot
|
||||||
%config(noreplace) %{ssldir}/dovecot-openssl.cnf
|
%config(noreplace) %{ssldir}/dovecot-openssl.cnf
|
||||||
|
|
||||||
%{_initddir}/dovecot
|
|
||||||
|
|
||||||
%dir %{ssldir}
|
%dir %{ssldir}
|
||||||
%dir %{ssldir}/certs
|
%dir %{ssldir}/certs
|
||||||
%dir %{ssldir}/private
|
%dir %{ssldir}/private
|
||||||
|
Loading…
Reference in New Issue
Block a user