spec cleanup
This commit is contained in:
parent
d28c0d0250
commit
3ae5a0317c
@ -11,8 +11,6 @@ Release: 7%{?dist}
|
|||||||
|
|
||||||
%define _cyrususer cyrus
|
%define _cyrususer cyrus
|
||||||
%define _cyrusgroup mail
|
%define _cyrusgroup mail
|
||||||
%define _vardata %{_var}/lib/imap
|
|
||||||
%define _spooldata %{_var}/spool/imap
|
|
||||||
%define _cyrexecdir %{_exec_prefix}/lib/%{name}
|
%define _cyrexecdir %{_exec_prefix}/lib/%{name}
|
||||||
|
|
||||||
%define _cyrusconf master/conf/prefork.conf
|
%define _cyrusconf master/conf/prefork.conf
|
||||||
@ -241,7 +239,7 @@ find doc -name "*.html.*" -type f | xargs -r %{__rm} -f
|
|||||||
%{__install} -m 644 %{SOURCE29} doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
%{__install} -m 644 %{SOURCE29} doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
||||||
|
|
||||||
# modify lmtp socket path in .conf files
|
# modify lmtp socket path in .conf files
|
||||||
%{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" master/conf/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
%{__perl} -pi -e "s@/var/imap/@%{_var}/lib/imap/@" master/conf/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
||||||
|
|
||||||
# enable in .conf files to prevent error messages
|
# enable in .conf files to prevent error messages
|
||||||
%{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf
|
%{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf
|
||||||
@ -274,9 +272,9 @@ done
|
|||||||
%{__install} -d \
|
%{__install} -d \
|
||||||
%{buildroot}%{_sysconfdir}/{rc.d/init.d,logrotate.d,pam.d,sysconfig,cron.daily} \
|
%{buildroot}%{_sysconfdir}/{rc.d/init.d,logrotate.d,pam.d,sysconfig,cron.daily} \
|
||||||
%{buildroot}%{_libdir}/sasl \
|
%{buildroot}%{_libdir}/sasl \
|
||||||
%{buildroot}%{_spooldata} \
|
%{buildroot}%{_var}/spool/imap \
|
||||||
%{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \
|
%{buildroot}%{_var}/lib/imap/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \
|
||||||
%{buildroot}%{_vardata}/ptclient \
|
%{buildroot}%{_var}/lib/imap/ptclient \
|
||||||
%{buildroot}%{_datadir}/%{name}/rpm \
|
%{buildroot}%{_datadir}/%{name}/rpm \
|
||||||
%{buildroot}%{_sysconfdir}/pki/%{name} \
|
%{buildroot}%{_sysconfdir}/pki/%{name} \
|
||||||
doc/contrib
|
doc/contrib
|
||||||
@ -354,6 +352,12 @@ touch %{buildroot}%{ssl_pem_file}
|
|||||||
# compress manpages
|
# compress manpages
|
||||||
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
||||||
|
|
||||||
|
#remove executable bit from docs
|
||||||
|
for ddir in doc perl/imap/examples
|
||||||
|
do
|
||||||
|
find $ddir -type f -exec %{__chmod} -x {} \;
|
||||||
|
done
|
||||||
|
|
||||||
# Remove installed but not packaged files
|
# Remove installed but not packaged files
|
||||||
%{__rm} -f %{buildroot}%{_cyrexecdir}/not-mkdep
|
%{__rm} -f %{buildroot}%{_cyrexecdir}/not-mkdep
|
||||||
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2header*
|
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2header*
|
||||||
@ -364,6 +368,7 @@ find %{buildroot} -name ".packlist" -exec %{__rm} -f {} \;
|
|||||||
%{__rm} -f doc/text/Makefile
|
%{__rm} -f doc/text/Makefile
|
||||||
%{__rm} -f %{buildroot}%{_mandir}/man8/syncnews.8*
|
%{__rm} -f %{buildroot}%{_mandir}/man8/syncnews.8*
|
||||||
%{__rm} -f doc/man/syncnews.8.html
|
%{__rm} -f doc/man/syncnews.8.html
|
||||||
|
find %{buildroot}%{perl_vendorarch} -name "*.bs" -exec %{__rm} -f {} \;
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{__rm} -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
@ -379,7 +384,7 @@ fi
|
|||||||
/sbin/chkconfig --add %{name}
|
/sbin/chkconfig --add %{name}
|
||||||
|
|
||||||
# Force synchronous updates, usually only on ext2 filesystems
|
# Force synchronous updates, usually only on ext2 filesystems
|
||||||
for i in %{_vardata}/{user,quota} %{_spooldata}
|
for i in %{_var}/lib/imap/{user,quota} %{_var}/spool/imap
|
||||||
do
|
do
|
||||||
chattr -R +S $i 2>/dev/null ||:
|
chattr -R +S $i 2>/dev/null ||:
|
||||||
done
|
done
|
||||||
@ -409,9 +414,6 @@ fi
|
|||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
/sbin/service %{name} stop >/dev/null 2>&1 || :
|
/sbin/service %{name} stop >/dev/null 2>&1 || :
|
||||||
/sbin/chkconfig --del %{name}
|
/sbin/chkconfig --del %{name}
|
||||||
%{__rm} -f %{_vardata}/socket/* 2> /dev/null
|
|
||||||
%{__rm} -f %{_vardata}/proc/* 2> /dev/null
|
|
||||||
%{__rm} -f %{_vardata}/ptclient/ptsock 2> /dev/null
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@ -422,7 +424,7 @@ fi
|
|||||||
%pre utils
|
%pre utils
|
||||||
# Create 'cyrus' user on target host
|
# Create 'cyrus' user on target host
|
||||||
/usr/sbin/groupadd -g %{gid} -r saslauth 2> /dev/null || :
|
/usr/sbin/groupadd -g %{gid} -r saslauth 2> /dev/null || :
|
||||||
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
|
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_var}/lib/imap -g %{_cyrusgroup} \
|
||||||
-G saslauth -s /sbin/nologin -u %{uid} -r %{_cyrususer} 2> /dev/null || :
|
-G saslauth -s /sbin/nologin -u %{uid} -r %{_cyrususer} 2> /dev/null || :
|
||||||
|
|
||||||
%post utils
|
%post utils
|
||||||
@ -432,12 +434,6 @@ if ! %{__grep} -q ^csync %{_sysconfdir}/services; then
|
|||||||
echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
|
echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun utils
|
|
||||||
if [ $1 = 0 ]; then
|
|
||||||
/usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYRIGHT README
|
%doc COPYRIGHT README
|
||||||
@ -445,7 +441,7 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/cyrus.conf
|
%config(noreplace) %{_sysconfdir}/cyrus.conf
|
||||||
%config(noreplace) %{_sysconfdir}/imapd.conf
|
%config(noreplace) %{_sysconfdir}/imapd.conf
|
||||||
%{_sysconfdir}/rc.d/init.d/%{name}
|
%{_sysconfdir}/rc.d/init.d/%{name}
|
||||||
%{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/pam.d/pop
|
%config(noreplace) %{_sysconfdir}/pam.d/pop
|
||||||
%config(noreplace) %{_sysconfdir}/pam.d/imap
|
%config(noreplace) %{_sysconfdir}/pam.d/imap
|
||||||
@ -515,22 +511,22 @@ fi
|
|||||||
%{_cyrexecdir}/ptdump
|
%{_cyrexecdir}/ptdump
|
||||||
%{_cyrexecdir}/ptexpire
|
%{_cyrexecdir}/ptexpire
|
||||||
%{_cyrexecdir}/ptloader
|
%{_cyrexecdir}/ptloader
|
||||||
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap
|
||||||
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/socket
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/backup
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/user
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/db
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/quota
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/log
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/proc
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/meta
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/log
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/md5
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/msg
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/msg
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/db
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/proc
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/sieve
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/ptclient
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/sync
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/quota
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/md5
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/rpm
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/rpm
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/sieve
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/backup
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/socket
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/meta
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/sync
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/ptclient
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/user
|
||||||
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}
|
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/spool/imap
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
%dir %{_datadir}/%{name}/rpm
|
%dir %{_datadir}/%{name}/rpm
|
||||||
%{_datadir}/%{name}/rpm/*
|
%{_datadir}/%{name}/rpm/*
|
||||||
@ -562,11 +558,9 @@ fi
|
|||||||
%dir %{perl_vendorarch}/auto/Cyrus
|
%dir %{perl_vendorarch}/auto/Cyrus
|
||||||
%dir %{perl_vendorarch}/auto/Cyrus/IMAP
|
%dir %{perl_vendorarch}/auto/Cyrus/IMAP
|
||||||
%{perl_vendorarch}/auto/Cyrus/IMAP/IMAP.so
|
%{perl_vendorarch}/auto/Cyrus/IMAP/IMAP.so
|
||||||
%{perl_vendorarch}/auto/Cyrus/IMAP/IMAP.bs
|
|
||||||
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE
|
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE
|
||||||
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve
|
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve
|
||||||
%{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve/managesieve.so
|
%{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve/managesieve.so
|
||||||
%{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve/managesieve.bs
|
|
||||||
%{_mandir}/man3/Cyrus::IMAP::Admin.3pm.gz
|
%{_mandir}/man3/Cyrus::IMAP::Admin.3pm.gz
|
||||||
%{_mandir}/man3/Cyrus::IMAP::Shell.3pm.gz
|
%{_mandir}/man3/Cyrus::IMAP::Shell.3pm.gz
|
||||||
%{_mandir}/man3/Cyrus::IMAP.3pm.gz
|
%{_mandir}/man3/Cyrus::IMAP.3pm.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user