236 lines
7.4 KiB
RPMSpec
236 lines
7.4 KiB
RPMSpec
|
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
|
||
|
|
||
|
Name: cyrus-imapd
|
||
|
Version: 2.3.16
|
||
|
Release: 4mamba
|
||
|
Summary: An IMAP server
|
||
|
Group: System/Servers
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
URL: http://asg.web.cmu.edu/cyrus/
|
||
|
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
|
||
|
Source1: imapd-conf
|
||
|
Source2: imapd-initscript
|
||
|
Source3: imap-pam
|
||
|
Patch: %{name}-2.2.12-gcc4.patch
|
||
|
License: GPL
|
||
|
BuildRequires: perl-devel >= %{perl_major_ver}
|
||
|
BuildRequires: libdb47-devel
|
||
|
BuildRequires: libopenssl-devel
|
||
|
BuildRequires: libsasl-devel
|
||
|
BuildRequires: libkrb5-devel
|
||
|
BuildRequires: net-snmp
|
||
|
BuildRequires: bison
|
||
|
BuildRequires: flex
|
||
|
#Requires: libdb2 >= 2.7.7, libkrb5 >= 1.3.6
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
IMAP (Internet Message Access Protocol) is an Internet standards-track protocol for accessing messages (mail, bboards, news, etc).
|
||
|
The Cyrus IMAP server differs from other IMAP server implementations in that it is generally intended to be run on sealed servers, where normal users are not permitted to log in.
|
||
|
The mailbox database is stored in parts of the filesystem that are private to the Cyrus IMAP system.
|
||
|
All user access to mail is through the IMAP, POP3, or KPOP protocols.
|
||
|
|
||
|
%package -n perl-Imap
|
||
|
Summary: Perl module for Cyrus IMAP
|
||
|
Group: Development/Libraries/Perl
|
||
|
Requires: perl >= %{perl_major_ver}
|
||
|
#Requires: libdb2 >= 2.7.7
|
||
|
|
||
|
%description -n perl-Imap
|
||
|
A Perl module for Cyrus IMAP.
|
||
|
|
||
|
%package devel
|
||
|
Summary: Devel package for Cyrus IMAP
|
||
|
Group: Development/Libraries
|
||
|
Requires: %{name} = %{version}
|
||
|
|
||
|
%description devel
|
||
|
IMAP (Internet Message Access Protocol) is an Internet standards-track protocol for accessing messages (mail, bboards, news, etc).
|
||
|
The Cyrus IMAP server differs from other IMAP server implementations in that it is generally intended to be run on sealed servers, where normal users are not permitted to log in.
|
||
|
The mailbox database is stored in parts of the filesystem that are private to the Cyrus IMAP system.
|
||
|
All user access to mail is through the IMAP, POP3, or KPOP protocols.
|
||
|
|
||
|
Devel package for Cyrus IMAP.
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
%build
|
||
|
%configure \
|
||
|
--with-cyrus-prefix=%{_libexecdir}/cyrus \
|
||
|
--with-bdb-incdir=%{_includedir}/db47 \
|
||
|
--with-cyrus-user=imap \
|
||
|
--with-cyrus-group=imap \
|
||
|
--with-bdb=db-4.7
|
||
|
|
||
|
sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/Makefile
|
||
|
sed -i 's|Makefile.PL PREFIX=\$(prefix)|Makefile.PL|' perl/sieve/Makefile
|
||
|
|
||
|
%make -j1
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
sed -i "s|/usr/man|/var/tmp/perl-root/usr/share/man|" perl/imap/Makefile
|
||
|
|
||
|
%makeinstall
|
||
|
|
||
|
install -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/imapd.conf
|
||
|
install -m 755 -D %{SOURCE2} %{buildroot}%{_initrddir}/imapd
|
||
|
install -m 644 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/imap
|
||
|
|
||
|
install -m 644 master/conf/normal.conf %{buildroot}%{_sysconfdir}/cyrus.conf
|
||
|
|
||
|
cp tools/mkimap %{buildroot}/usr/libexec/cyrus/bin
|
||
|
|
||
|
install -d %{buildroot}/var/imap
|
||
|
install -d %{buildroot}/var/spool/imap
|
||
|
|
||
|
%define PERL_ARCHLIB %(eval `perl -V:archlib`; echo $archlib)
|
||
|
%define PERL_SITEARCH %(eval `perl -V:sitearch`; echo $sitearch)
|
||
|
|
||
|
rm -f %{buildroot}%{PERL_ARCHLIB}/perllocal.pod
|
||
|
|
||
|
cat %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/IMAP/.packlist \
|
||
|
%{buildroot}%{PERL_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist | \
|
||
|
sed "s@%{buildroot}@@g;s@.*/man/.*@&.gz@g" | \
|
||
|
sort -u > perl.packlist
|
||
|
rm %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/IMAP/.packlist
|
||
|
rm %{buildroot}%{PERL_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist
|
||
|
|
||
|
# conflicting with postfix
|
||
|
mv %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/master-imapd.8
|
||
|
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
rm -f perl_Imap.filelist
|
||
|
|
||
|
%pre
|
||
|
# new install
|
||
|
if [ $1 -eq 1 ]; then
|
||
|
/usr/sbin/groupadd imap
|
||
|
/usr/sbin/useradd -u 64910 -g imap -d /sbin/false imap -s /bin/false
|
||
|
fi
|
||
|
exit 0
|
||
|
|
||
|
%post
|
||
|
# new install
|
||
|
if [ $1 -eq 1 ]; then
|
||
|
/usr/libexec/cyrus/bin/mkimap
|
||
|
/bin/chown -R imap.imap /var/imap/*
|
||
|
/bin/chown -R imap.imap /var/spool/imap/*
|
||
|
/sbin/chkconfig --add imapd
|
||
|
service imapd start
|
||
|
fi
|
||
|
exit 0
|
||
|
|
||
|
%preun
|
||
|
# erase
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
service imapd stop
|
||
|
/sbin/chkconfig --del imapd
|
||
|
/usr/sbin/userdel imap 2>/dev/null
|
||
|
/usr/sbin/groupdel imap 2>/dev/null
|
||
|
fi
|
||
|
exit 0
|
||
|
|
||
|
%postun
|
||
|
# upgrade
|
||
|
if [ $1 -eq 1 ]; then
|
||
|
service imapd restart
|
||
|
fi
|
||
|
exit 0
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%config(noreplace) %{_sysconfdir}/imapd.conf
|
||
|
%config(noreplace) %{_sysconfdir}/cyrus.conf
|
||
|
%config(noreplace) %{_sysconfdir}/pam.d/imap
|
||
|
%attr(0755,root,root) %{_initrddir}/imapd
|
||
|
%{_bindir}/imtest
|
||
|
%{_bindir}/installsieve
|
||
|
%{_bindir}/lmtptest
|
||
|
%{_bindir}/mupdatetest
|
||
|
%{_bindir}/nntptest
|
||
|
%{_bindir}/pop3test
|
||
|
%{_bindir}/sieveshell
|
||
|
%{_bindir}/sivtest
|
||
|
%{_bindir}/smtptest
|
||
|
%{_bindir}/synctest
|
||
|
%{_libexecdir}/cyrus/*
|
||
|
%{_mandir}/man1/imtest.1.gz
|
||
|
%{_mandir}/man1/installsieve.1.gz
|
||
|
%{_mandir}/man1/lmtptest.1.gz
|
||
|
%{_mandir}/man1/mupdatetest.1.gz
|
||
|
%{_mandir}/man1/nntptest.1.gz
|
||
|
%{_mandir}/man1/pop3test.1.gz
|
||
|
%{_mandir}/man1/sieveshell.1.gz
|
||
|
%{_mandir}/man1/sivtest.1.gz
|
||
|
%{_mandir}/man1/smtptest.1.gz
|
||
|
%{_mandir}/man3/imclient.3.gz
|
||
|
%{_mandir}/man5/*
|
||
|
%{_mandir}/man8/*
|
||
|
%dir %attr(0750,imap,imap) %{_localstatedir}/imap
|
||
|
%dir %attr(0750,imap,imap) %{_localstatedir}/spool/imap
|
||
|
|
||
|
%files devel
|
||
|
%defattr(-,root,root)
|
||
|
%{_includedir}/*
|
||
|
%{_libdir}/*.a
|
||
|
|
||
|
%files -n perl-Imap -f perl.packlist
|
||
|
%defattr(-,root,root)
|
||
|
|
||
|
%changelog
|
||
|
* Mon Apr 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.16-4mamba
|
||
|
- rename master(8) man entry conflicting with postfix
|
||
|
- fix files packaged into two packages
|
||
|
|
||
|
* Fri Oct 22 2010 Automatic Build System <autodist@mambasoft.it> 2.3.16-3mamba
|
||
|
- automatic rebuild by autodist
|
||
|
|
||
|
* Sun Aug 08 2010 Automatic Build System <autodist@mambasoft.it> 2.3.16-2mamba
|
||
|
- automatic rebuild by autodist
|
||
|
|
||
|
* Wed Jan 13 2010 Automatic Build System <autodist@mambasoft.it> 2.3.16-1mamba
|
||
|
- automatic update by autodist
|
||
|
|
||
|
* Thu Sep 10 2009 Automatic Build System <autodist@mambasoft.it> 2.3.15-1mamba
|
||
|
- automatic update by autodist
|
||
|
|
||
|
* Mon Jun 08 2009 Automatic Build System <autodist@mambasoft.it> 2.3.14-2mamba
|
||
|
- automatic rebuild by autodist
|
||
|
|
||
|
* Thu Apr 09 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.14-1mamba
|
||
|
- automatic update by autodist
|
||
|
|
||
|
* Thu Jan 01 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.13-2mamba
|
||
|
- automatic rebuild by autodist
|
||
|
|
||
|
* Thu Nov 13 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.13-1mamba
|
||
|
- update to 2.3.13
|
||
|
|
||
|
* Thu Nov 13 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.12-4mamba
|
||
|
- automatic rebuild by autodist
|
||
|
|
||
|
* Wed Jan 11 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.2.12-3qilnx
|
||
|
- gcc4 compilation fix
|
||
|
|
||
|
* Thu Apr 28 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.2.12-2qilnx
|
||
|
- removed unneeded requirements
|
||
|
- fixed a few file permissions
|
||
|
|
||
|
* Wed Apr 27 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.2.12-1qilnx
|
||
|
- update to version 2.2.12 by autospec
|
||
|
- also fix security issue QSA-2005-055 (CAN-2004-101[1,2,3,5],
|
||
|
CAN-2004-[1067,1089], CAN-2005-0546)
|
||
|
|
||
|
* Tue Oct 26 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.16-2qilnx
|
||
|
- rebuild after binary rpms loss
|
||
|
|
||
|
* Thu Jan 08 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.1.16-1qilnx
|
||
|
- specfile updated, package updated to version 2.1.16, rebuild with perl 5.8.2
|
||
|
|
||
|
* Tue Sep 10 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.15-1qilnx
|
||
|
- first build
|