Группа :: Система/Серверы
Пакет: cyrus-imapd
Главная Изменения Спек Патчи Загрузить Bugs and FR
Name: cyrus-imapd
Version: 2.2.12
Release: alt0.M24.2
Summary: A high-performance mail store with IMAP and POP3 support
License: CMU License
Group: System/Servers
Url: http://asg.web.cmu.edu/cyrus/imapd/
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%name-%version.tar.gz
Source1: cyrus-procmailrc
Source2: cyrus-user-procmailrc.template
Source3: %name.logrotate
Source4: %name.imap-2.1.x-conf
Source5: README.ALT
Source6: %name.control
Source7: %name.pam-config
Source8: %name-procmail+cyrus.mc
Source10: %name.sysconfig
Source11: %name.cvt_cyrusdb_all
Source12: %name.magic
Source13: %name.sasl-conf
Source14: %name.cron-daily
Source16: folderxfer
Source17: imapcreate.pl
Source18: inboxfer
Source19: %name-README.HOWTO-recover-mailboxes.db
Source20: %name-sendmail-8.12.9-cyrusv2.m4
Source21: %name.init
Patch1: %name-2.2.6-configs.patch
Patch5: %name-2.1.9-fdatasync.patch
Patch7: http://servercc.oakton.edu/~jwade/cyrus/cyrus-imapd-2.1.3/cyrus-imapd-2.1.3-flock.patch
Patch8: %name-alt-header8bit.patch
Patch9: %name-alt-cyradm.patch
Patch11: %name-2.2.12-autocreate-0.9.2.diff
PreReq: e2fsprogs, /sbin/chkconfig, /sbin/service
Provides: MDA
Provides: imap = %version
Obsoletes: imap
Provides: IMAPD = %name:%version-%release
Provides: POP3D = %name:%version-%release
Conflicts: IMAPD < %name:%version-%release
Conflicts: IMAPD > %name:%version-%release
Conflicts: POP3D < %name:%version-%release
Conflicts: POP3D > %name:%version-%release
%define _cyrususer cyrus
%define _cyrusgroup cyrus
%define _vardata %_var/lib/imap
%define _spooldata %_var/spool/imap
%define _cyrexecdir %_libdir/cyrus
%define _confdir master/conf
%define _contribdir %_datadir/%name/contrib
%define _cyrusconf %_confdir/prefork.conf
Requires: libsasl2-plugin-gssapi
# Automatically added by buildreq on Wed May 21 2003
BuildRequires: flex libe2fs-devel libsasl2-devel
BuildRequires: libssl-devel perl-devel
BuildRequires: libkrb5-devel >= 1.3.1-alt3
BuildRequires: pam0-config libpam0-devel libdb4-devel
%description
The %name package contains the core of the Cyrus IMAP server.
It is a scaleable enterprise mail system designed for use from
small to large enterprise environments using standards-based
internet mail technologies.
A full Cyrus IMAP implementation allows a seamless mail and bulletin
board environment to be set up across multiple servers. It differs from
other IMAP server implementations in that it is run on "sealed"
servers, where users are not normally permitted to log in. The mailbox
database is stored in parts of the filesystem that are private to the
Cyrus IMAP server. All user access to mail is through software using
the IMAP, POP3, or KPOP protocols. TLSv1 and SSL are supported for
security.
%package murder
Group: System/Servers
Summary: Cyrus IMAP server murder aggregator system files
Requires: %name = %version-%release
%description murder
The %name-murder package contains the Cyrus murder aggregator system,
i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
It allows for cluster setups where there are many backend Cyrus spools
and frontend proxy servers.
%package devel
Group: Development/C
Summary: Cyrus IMAP server development files
%description devel
The %name-devel package contains header files and libraries
necessary for developing applications which use the imclient library.
%package -n perl-Cyrus
Group: Development/Perl
Summary: Cyrus IMAP server utility Perl modules
Provides: perl(Cyrus/IMAP.pm) perl(Cyrus/IMAP/Admin.pm)
%description -n perl-Cyrus
The perl-Cyrus package contains Perl modules necessary to use the
Cyrus IMAP server administration utilities.
%package utils
Group: System/Servers
Summary: Cyrus IMAP server administration utilities
Requires: perl-Cyrus = %version-%release
%description utils
The %name-utils package contains administrative tools for the
Cyrus IMAP server. It can be installed on systems other than the
one running the server.
%package doc
Group: System/Servers
Summary: Cyrus IMAP server documentation
%description doc
The %name-doc package contains Here the documentation about
Cyrus IMAP server.
%prep
%setup -q -n %name-%version
%patch1 -p1 -b .config
%patch5 -p0 -b .fdatasync
%patch7 -p1 -b .flock
%patch8 -p1 -b .8bit
%patch9 -p1 -b .cyradm
%patch11 -p1 -b .autocreate
%build
# kerberos include is needed (because of openssl-0.9.7 ?)
CPPFLAGS="-I%_includedir/et -I%prefix/include/krb5 $CPPFLAGS"
export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS -fPIC $CFLAGS"
export CFLAGS
LDFLAGS="-L/usr/lib/krb5 $LDFLAGS"
export LDFLAGS
pushd makedepend
./configure
%__make
popd
%configure \
--enable-netscapehack \
--enable-listext \
--enable-nntp \
--enable-murder \
--without-ucdsnmp \
--with-perl=%__perl \
--with-libwrap=%prefix \
--with-cyrus-prefix=%_cyrexecdir \
--with-service-path=%_cyrexecdir \
--with-cyrus-user=%_cyrususer \
--with-cyrus-group=%_cyrusgroup \
--with-auth=unix \
--with-idle=idled \
--with-bdb-incdir=%_includedir/db4
# --with-krb=%prefix/lib/krb5
%__make
# Modify docs master --> cyrus-master
pushd man
%__subst 's/master(8)/cyrus-master(8)/' *5 *8
popd
pushd doc
%__subst 's/master/cyrus-master/g' man.html
popd
pushd doc/man
%__subst 's/master(8)/cyrus-master(8)/' *html
popd
# Modify path in perl scripts
find . -type f -name \*.pl -print0 |
xargs -r0 %__perl -pi -e 's at \/usr\/local\/bin\/perl at %__perl at ' --
# Cleanup of doc dir
find doc perl -name CVS -type d | xargs -r rm -fr --
find doc -name "*~" -type f | xargs -r rm -f --
%__rm -f doc/Makefile.dist
%__rm -f doc/text/htmlstrip.c
%install
# Do what the regular make install does
%__make install DESTDIR=%buildroot PREFIX=%prefix mandir=%_mandir \
INSTALLDIRS=vendor
%__make -C man install DESTDIR=%buildroot PREFIX=%prefix mandir=%_mandir
%__install -m 755 imtest/imtest %buildroot%_cyrexecdir/
%__install -m 755 perl/imap/cyradm %buildroot%_cyrexecdir/
# Install tools
for tool in tools/* ; do
test -f ${tool} && %__install -m 755 ${tool} %buildroot%_cyrexecdir/
done
%__install -d \
%buildroot%_sysconfdir/{rc.d/init.d,logrotate.d,pam.d,sysconfig,cron.daily} \
%buildroot%_libdir/sasl2 \
%buildroot%_bindir \
%buildroot%_spooldata/stage. \
%buildroot%_vardata/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup} \
%buildroot%_contribdir \
%buildroot%_datadir/%name/rpm
%__install -m 755 %SOURCE11 %buildroot%_cyrexecdir/cvt_cyrusdb_all
%__install -m 755 %SOURCE12 %buildroot%_datadir/%name/rpm/magic
%__install -m 644 %_cyrusconf %buildroot%_sysconfdir/cyrus.conf
%__install -m 644 %SOURCE4 %buildroot%_sysconfdir/imapd.conf
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/pop
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/imap
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/sieve
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/mupdate
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/lmtp
%__install -m 644 %SOURCE10 %buildroot%_sysconfdir/sysconfig/%name
%__install -m 755 %SOURCE21 %buildroot%_initdir/%name
%__install -m 644 %SOURCE3 %buildroot%_sysconfdir/logrotate.d/%name
%__install -m 755 %SOURCE14 %buildroot%_sysconfdir/cron.daily/%name
%__install -m 600 %SOURCE13 %buildroot%_libdir/sasl2/Cyrus.conf
%__install -m 755 -d doc/conf
%__install -m 644 %_confdir/*.conf doc/conf/
%__install -pD -m 755 %SOURCE6 %buildroot%_controldir/%name
%__install -m 755 %SOURCE16 %SOURCE17 %SOURCE18 %buildroot%_contribdir
%__install -m 644 %SOURCE19 %SOURCE20 %SOURCE5 doc/
# Rename 'master' binary and manpage to avoid crash with postfix
mv -f %buildroot%_cyrexecdir/master %buildroot%_cyrexecdir/cyrus-master
mv -f %buildroot%_mandir/man8/master.8 %buildroot%_mandir/man8/cyrus-master.8
mv -f doc/man/master.8.html doc/man/cyrus-master.8.html
ln -sf ../lib/cyrus/cyradm %buildroot%_bindir/
ln -sf ../lib/cyrus/imtest %buildroot%_bindir/
# Create filelist for perl package, compress manpages before
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
find %buildroot%perl_vendor_autolib/Cyrus %buildroot%perl_vendor_archlib/Cyrus -type f -print |
sed "s at ^%buildroot at at g" |
grep -v perllocal.pod |
grep -v "\.bs" |
grep -v "\.packlist" > perl-Cyrus-%version-filelist
find %buildroot%perl_vendor_man3dir -type f -name "Cyrus*" -print |
sed "s at ^%buildroot at at g" >> perl-Cyrus-%version-filelist
if [ "$(cat perl-Cyrus-%version-filelist)X" = "X" ] ; then
echo "ERROR: EMPTY FILE LIST"
exit -1
fi
# Remove installed but not packaged files
rm -f %buildroot%_cyrexecdir/not-mkdep
find %buildroot -name "perllocal.pod" -exec rm -f {} \;
find %buildroot -name ".packlist" -exec rm -f {} \;
# Create file wich contains information about compiled db backends
for conf in DUPLICATE MBOX SEEN SUBS TLS
do
echo CONFIG_DB_${conf}=$(grep "CONFIG_DB_${conf}" config.h | sed -e 's/)//' -e 's/_/-/g' | cut -d" " -f3 | cut -d"-" -f2) >> %buildroot%_datadir/%name/rpm/db.cfg
done
## Create SSL certificates
#exec > /dev/null 2> /dev/null
#if [ ! -f %_datadir/ssl/certs/%name.pem ]; then
#pushd %_datadir/ssl/certs
#umask 077
#cat << EOF | make %name.pem
#--
#Irkutsk Area
#Ust-Ilimsk
#Telnet
#Telnet
#mail.ilimnet.ru
#root at ilimnet.ru
#EOF
#chown root.%_cyrusgroup %name.pem
#chmod 640 %name.pem
#popd
#fi
%pre
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %_vardata \
-s /dev/null -r %_cyrususer 2> /dev/null || :
%post
%post_service %name
# Force synchronous updates, usually only on ext2 filesystems
for i in %_vardata/{user,quota} %_spooldata
do
if [ `find $i -maxdepth 0 -printf %%F` = "ext2" ]; then
chattr -R +S $i 2>/dev/null
fi
done
%preun
%preun_service %name
%files
%config %_initdir/%name
%config %_controldir/*
%config %_sysconfdir/logrotate.d/%name
%config(noreplace) %_sysconfdir/cyrus.conf
%config(noreplace) %_sysconfdir/imapd.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%config(noreplace) %_sysconfdir/pam.d/*
#
%exclude %_sysconfdir/pam.d/mupdate
%config(noreplace) %_sysconfdir/cron.daily/%name
%config(noreplace) %attr(600,%_cyrususer,%_cyrusgroup) %_libdir/sasl2/Cyrus.conf
%dir %_cyrexecdir
%attr(4710,%_cyrususer,%_cyrusgroup) %_cyrexecdir/deliver
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_vardata
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_vardata/*
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_spooldata
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_spooldata/*
%dir %_datadir/%name
%dir %_datadir/%name/*
%dir %_datadir/%name/rpm
%_datadir/%name/rpm/*
%_man5dir/*
%_man8dir/*
%_cyrexecdir/*
%exclude %_cyrexecdir/lmtpproxyd
%exclude %_cyrexecdir/mupdate
%exclude %_cyrexecdir/pop3proxyd
%exclude %_cyrexecdir/proxyd
%exclude %_cyrexecdir/arbitronsort.pl
%exclude %_cyrexecdir/cyradm
%exclude %_cyrexecdir/imtest
%exclude %_cyrexecdir/mupdate-loadgen.pl
%exclude %_cyrexecdir/convert-sieve.pl
%exclude %_cyrexecdir/mknewsgroups
%exclude %_cyrexecdir/config2header
%exclude %_cyrexecdir/config2man
%exclude %_cyrexecdir/masssievec
%files doc
%doc COPYRIGHT README README.autocreate
%doc $RPM_SOURCE_DIR/cyrus-procmailrc
%doc $RPM_SOURCE_DIR/cyrus-user-procmailrc.template
%doc $RPM_SOURCE_DIR/%name-procmail+cyrus.mc
%doc doc/*
%files murder
%config(noreplace) %_sysconfdir/pam.d/mupdate
%_cyrexecdir/lmtpproxyd
%_cyrexecdir/mupdate
%_cyrexecdir/pop3proxyd
%_cyrexecdir/proxyd
%files devel
%_includedir/cyrus
%_libdir/lib*.a
%_man3dir/*
%files -n perl-Cyrus
%perl_vendor_autolib/Cyrus*
%perl_vendor_archlib/Cyrus*
%doc perl/imap/README
%doc perl/imap/Changes
%doc perl/imap/examples
%files utils
%_cyrexecdir/arbitronsort.pl
%_cyrexecdir/cyradm
%_cyrexecdir/imtest
%_cyrexecdir/mupdate-loadgen.pl
%_cyrexecdir/convert-sieve.pl
%_cyrexecdir/mknewsgroups
%_cyrexecdir/config2header
%_cyrexecdir/config2man
%_cyrexecdir/masssievec
%_contribdir
%_bindir/*
%_man1dir/*
%changelog
…
Полный changelog можно просмотреть здесь
Version: 2.2.12
Release: alt0.M24.2
Summary: A high-performance mail store with IMAP and POP3 support
License: CMU License
Group: System/Servers
Url: http://asg.web.cmu.edu/cyrus/imapd/
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%name-%version.tar.gz
Source1: cyrus-procmailrc
Source2: cyrus-user-procmailrc.template
Source3: %name.logrotate
Source4: %name.imap-2.1.x-conf
Source5: README.ALT
Source6: %name.control
Source7: %name.pam-config
Source8: %name-procmail+cyrus.mc
Source10: %name.sysconfig
Source11: %name.cvt_cyrusdb_all
Source12: %name.magic
Source13: %name.sasl-conf
Source14: %name.cron-daily
Source16: folderxfer
Source17: imapcreate.pl
Source18: inboxfer
Source19: %name-README.HOWTO-recover-mailboxes.db
Source20: %name-sendmail-8.12.9-cyrusv2.m4
Source21: %name.init
Patch1: %name-2.2.6-configs.patch
Patch5: %name-2.1.9-fdatasync.patch
Patch7: http://servercc.oakton.edu/~jwade/cyrus/cyrus-imapd-2.1.3/cyrus-imapd-2.1.3-flock.patch
Patch8: %name-alt-header8bit.patch
Patch9: %name-alt-cyradm.patch
Patch11: %name-2.2.12-autocreate-0.9.2.diff
PreReq: e2fsprogs, /sbin/chkconfig, /sbin/service
Provides: MDA
Provides: imap = %version
Obsoletes: imap
Provides: IMAPD = %name:%version-%release
Provides: POP3D = %name:%version-%release
Conflicts: IMAPD < %name:%version-%release
Conflicts: IMAPD > %name:%version-%release
Conflicts: POP3D < %name:%version-%release
Conflicts: POP3D > %name:%version-%release
%define _cyrususer cyrus
%define _cyrusgroup cyrus
%define _vardata %_var/lib/imap
%define _spooldata %_var/spool/imap
%define _cyrexecdir %_libdir/cyrus
%define _confdir master/conf
%define _contribdir %_datadir/%name/contrib
%define _cyrusconf %_confdir/prefork.conf
Requires: libsasl2-plugin-gssapi
# Automatically added by buildreq on Wed May 21 2003
BuildRequires: flex libe2fs-devel libsasl2-devel
BuildRequires: libssl-devel perl-devel
BuildRequires: libkrb5-devel >= 1.3.1-alt3
BuildRequires: pam0-config libpam0-devel libdb4-devel
%description
The %name package contains the core of the Cyrus IMAP server.
It is a scaleable enterprise mail system designed for use from
small to large enterprise environments using standards-based
internet mail technologies.
A full Cyrus IMAP implementation allows a seamless mail and bulletin
board environment to be set up across multiple servers. It differs from
other IMAP server implementations in that it is run on "sealed"
servers, where users are not normally permitted to log in. The mailbox
database is stored in parts of the filesystem that are private to the
Cyrus IMAP server. All user access to mail is through software using
the IMAP, POP3, or KPOP protocols. TLSv1 and SSL are supported for
security.
%package murder
Group: System/Servers
Summary: Cyrus IMAP server murder aggregator system files
Requires: %name = %version-%release
%description murder
The %name-murder package contains the Cyrus murder aggregator system,
i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
It allows for cluster setups where there are many backend Cyrus spools
and frontend proxy servers.
%package devel
Group: Development/C
Summary: Cyrus IMAP server development files
%description devel
The %name-devel package contains header files and libraries
necessary for developing applications which use the imclient library.
%package -n perl-Cyrus
Group: Development/Perl
Summary: Cyrus IMAP server utility Perl modules
Provides: perl(Cyrus/IMAP.pm) perl(Cyrus/IMAP/Admin.pm)
%description -n perl-Cyrus
The perl-Cyrus package contains Perl modules necessary to use the
Cyrus IMAP server administration utilities.
%package utils
Group: System/Servers
Summary: Cyrus IMAP server administration utilities
Requires: perl-Cyrus = %version-%release
%description utils
The %name-utils package contains administrative tools for the
Cyrus IMAP server. It can be installed on systems other than the
one running the server.
%package doc
Group: System/Servers
Summary: Cyrus IMAP server documentation
%description doc
The %name-doc package contains Here the documentation about
Cyrus IMAP server.
%prep
%setup -q -n %name-%version
%patch1 -p1 -b .config
%patch5 -p0 -b .fdatasync
%patch7 -p1 -b .flock
%patch8 -p1 -b .8bit
%patch9 -p1 -b .cyradm
%patch11 -p1 -b .autocreate
%build
# kerberos include is needed (because of openssl-0.9.7 ?)
CPPFLAGS="-I%_includedir/et -I%prefix/include/krb5 $CPPFLAGS"
export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS -fPIC $CFLAGS"
export CFLAGS
LDFLAGS="-L/usr/lib/krb5 $LDFLAGS"
export LDFLAGS
pushd makedepend
./configure
%__make
popd
%configure \
--enable-netscapehack \
--enable-listext \
--enable-nntp \
--enable-murder \
--without-ucdsnmp \
--with-perl=%__perl \
--with-libwrap=%prefix \
--with-cyrus-prefix=%_cyrexecdir \
--with-service-path=%_cyrexecdir \
--with-cyrus-user=%_cyrususer \
--with-cyrus-group=%_cyrusgroup \
--with-auth=unix \
--with-idle=idled \
--with-bdb-incdir=%_includedir/db4
# --with-krb=%prefix/lib/krb5
%__make
# Modify docs master --> cyrus-master
pushd man
%__subst 's/master(8)/cyrus-master(8)/' *5 *8
popd
pushd doc
%__subst 's/master/cyrus-master/g' man.html
popd
pushd doc/man
%__subst 's/master(8)/cyrus-master(8)/' *html
popd
# Modify path in perl scripts
find . -type f -name \*.pl -print0 |
xargs -r0 %__perl -pi -e 's at \/usr\/local\/bin\/perl at %__perl at ' --
# Cleanup of doc dir
find doc perl -name CVS -type d | xargs -r rm -fr --
find doc -name "*~" -type f | xargs -r rm -f --
%__rm -f doc/Makefile.dist
%__rm -f doc/text/htmlstrip.c
%install
# Do what the regular make install does
%__make install DESTDIR=%buildroot PREFIX=%prefix mandir=%_mandir \
INSTALLDIRS=vendor
%__make -C man install DESTDIR=%buildroot PREFIX=%prefix mandir=%_mandir
%__install -m 755 imtest/imtest %buildroot%_cyrexecdir/
%__install -m 755 perl/imap/cyradm %buildroot%_cyrexecdir/
# Install tools
for tool in tools/* ; do
test -f ${tool} && %__install -m 755 ${tool} %buildroot%_cyrexecdir/
done
%__install -d \
%buildroot%_sysconfdir/{rc.d/init.d,logrotate.d,pam.d,sysconfig,cron.daily} \
%buildroot%_libdir/sasl2 \
%buildroot%_bindir \
%buildroot%_spooldata/stage. \
%buildroot%_vardata/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup} \
%buildroot%_contribdir \
%buildroot%_datadir/%name/rpm
%__install -m 755 %SOURCE11 %buildroot%_cyrexecdir/cvt_cyrusdb_all
%__install -m 755 %SOURCE12 %buildroot%_datadir/%name/rpm/magic
%__install -m 644 %_cyrusconf %buildroot%_sysconfdir/cyrus.conf
%__install -m 644 %SOURCE4 %buildroot%_sysconfdir/imapd.conf
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/pop
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/imap
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/sieve
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/mupdate
%__install -m 644 %SOURCE7 %buildroot%_sysconfdir/pam.d/lmtp
%__install -m 644 %SOURCE10 %buildroot%_sysconfdir/sysconfig/%name
%__install -m 755 %SOURCE21 %buildroot%_initdir/%name
%__install -m 644 %SOURCE3 %buildroot%_sysconfdir/logrotate.d/%name
%__install -m 755 %SOURCE14 %buildroot%_sysconfdir/cron.daily/%name
%__install -m 600 %SOURCE13 %buildroot%_libdir/sasl2/Cyrus.conf
%__install -m 755 -d doc/conf
%__install -m 644 %_confdir/*.conf doc/conf/
%__install -pD -m 755 %SOURCE6 %buildroot%_controldir/%name
%__install -m 755 %SOURCE16 %SOURCE17 %SOURCE18 %buildroot%_contribdir
%__install -m 644 %SOURCE19 %SOURCE20 %SOURCE5 doc/
# Rename 'master' binary and manpage to avoid crash with postfix
mv -f %buildroot%_cyrexecdir/master %buildroot%_cyrexecdir/cyrus-master
mv -f %buildroot%_mandir/man8/master.8 %buildroot%_mandir/man8/cyrus-master.8
mv -f doc/man/master.8.html doc/man/cyrus-master.8.html
ln -sf ../lib/cyrus/cyradm %buildroot%_bindir/
ln -sf ../lib/cyrus/imtest %buildroot%_bindir/
# Create filelist for perl package, compress manpages before
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
find %buildroot%perl_vendor_autolib/Cyrus %buildroot%perl_vendor_archlib/Cyrus -type f -print |
sed "s at ^%buildroot at at g" |
grep -v perllocal.pod |
grep -v "\.bs" |
grep -v "\.packlist" > perl-Cyrus-%version-filelist
find %buildroot%perl_vendor_man3dir -type f -name "Cyrus*" -print |
sed "s at ^%buildroot at at g" >> perl-Cyrus-%version-filelist
if [ "$(cat perl-Cyrus-%version-filelist)X" = "X" ] ; then
echo "ERROR: EMPTY FILE LIST"
exit -1
fi
# Remove installed but not packaged files
rm -f %buildroot%_cyrexecdir/not-mkdep
find %buildroot -name "perllocal.pod" -exec rm -f {} \;
find %buildroot -name ".packlist" -exec rm -f {} \;
# Create file wich contains information about compiled db backends
for conf in DUPLICATE MBOX SEEN SUBS TLS
do
echo CONFIG_DB_${conf}=$(grep "CONFIG_DB_${conf}" config.h | sed -e 's/)//' -e 's/_/-/g' | cut -d" " -f3 | cut -d"-" -f2) >> %buildroot%_datadir/%name/rpm/db.cfg
done
## Create SSL certificates
#exec > /dev/null 2> /dev/null
#if [ ! -f %_datadir/ssl/certs/%name.pem ]; then
#pushd %_datadir/ssl/certs
#umask 077
#cat << EOF | make %name.pem
#--
#Irkutsk Area
#Ust-Ilimsk
#Telnet
#Telnet
#mail.ilimnet.ru
#root at ilimnet.ru
#EOF
#chown root.%_cyrusgroup %name.pem
#chmod 640 %name.pem
#popd
#fi
%pre
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %_vardata \
-s /dev/null -r %_cyrususer 2> /dev/null || :
%post
%post_service %name
# Force synchronous updates, usually only on ext2 filesystems
for i in %_vardata/{user,quota} %_spooldata
do
if [ `find $i -maxdepth 0 -printf %%F` = "ext2" ]; then
chattr -R +S $i 2>/dev/null
fi
done
%preun
%preun_service %name
%files
%config %_initdir/%name
%config %_controldir/*
%config %_sysconfdir/logrotate.d/%name
%config(noreplace) %_sysconfdir/cyrus.conf
%config(noreplace) %_sysconfdir/imapd.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%config(noreplace) %_sysconfdir/pam.d/*
#
%exclude %_sysconfdir/pam.d/mupdate
%config(noreplace) %_sysconfdir/cron.daily/%name
%config(noreplace) %attr(600,%_cyrususer,%_cyrusgroup) %_libdir/sasl2/Cyrus.conf
%dir %_cyrexecdir
%attr(4710,%_cyrususer,%_cyrusgroup) %_cyrexecdir/deliver
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_vardata
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_vardata/*
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_spooldata
%attr(0700,%_cyrususer,%_cyrusgroup) %dir %_spooldata/*
%dir %_datadir/%name
%dir %_datadir/%name/*
%dir %_datadir/%name/rpm
%_datadir/%name/rpm/*
%_man5dir/*
%_man8dir/*
%_cyrexecdir/*
%exclude %_cyrexecdir/lmtpproxyd
%exclude %_cyrexecdir/mupdate
%exclude %_cyrexecdir/pop3proxyd
%exclude %_cyrexecdir/proxyd
%exclude %_cyrexecdir/arbitronsort.pl
%exclude %_cyrexecdir/cyradm
%exclude %_cyrexecdir/imtest
%exclude %_cyrexecdir/mupdate-loadgen.pl
%exclude %_cyrexecdir/convert-sieve.pl
%exclude %_cyrexecdir/mknewsgroups
%exclude %_cyrexecdir/config2header
%exclude %_cyrexecdir/config2man
%exclude %_cyrexecdir/masssievec
%files doc
%doc COPYRIGHT README README.autocreate
%doc $RPM_SOURCE_DIR/cyrus-procmailrc
%doc $RPM_SOURCE_DIR/cyrus-user-procmailrc.template
%doc $RPM_SOURCE_DIR/%name-procmail+cyrus.mc
%doc doc/*
%files murder
%config(noreplace) %_sysconfdir/pam.d/mupdate
%_cyrexecdir/lmtpproxyd
%_cyrexecdir/mupdate
%_cyrexecdir/pop3proxyd
%_cyrexecdir/proxyd
%files devel
%_includedir/cyrus
%_libdir/lib*.a
%_man3dir/*
%files -n perl-Cyrus
%perl_vendor_autolib/Cyrus*
%perl_vendor_archlib/Cyrus*
%doc perl/imap/README
%doc perl/imap/Changes
%doc perl/imap/examples
%files utils
%_cyrexecdir/arbitronsort.pl
%_cyrexecdir/cyradm
%_cyrexecdir/imtest
%_cyrexecdir/mupdate-loadgen.pl
%_cyrexecdir/convert-sieve.pl
%_cyrexecdir/mknewsgroups
%_cyrexecdir/config2header
%_cyrexecdir/config2man
%_cyrexecdir/masssievec
%_contribdir
%_bindir/*
%_man1dir/*
%changelog
…
Полный changelog можно просмотреть здесь