source: spec/trunk/SPECS/courier-imap.spec@ 1036

Last change on this file since 1036 was 206, checked in by Yuri Dario, 14 years ago

spec: added courier imap and authlib build.

  • Property svn:eol-style set to native
File size: 9.1 KB
Line 
1#
2# spec file for package courier-imap (Version 4.8.1)
3#
4# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
5#
6# All modifications and additions to the file contributed by third parties
7# remain the property of their copyright owners, unless otherwise agreed
8# upon. The license for this file, and modifications and additions to the
9# file, is the same license as for the pristine package itself (unless the
10# license for the pristine package is not an Open Source License, in which
11# case the license is the MIT License). An "Open Source License" is a
12# license that conforms to the Open Source Definition (Version 1.9)
13# published by the Open Source Initiative.
14
15# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18# norootforbuild
19
20
21Name: courier-imap
22Summary: An IMAP and POP3 Server for Maildir MTAs
23Version: 4.8.1
24Release: 0%{?dist}
25License: GPLv2+
26Group: Productivity/Networking/Email/Servers
27Url: http://www.courier-mta.org/imap/
28Source: %{name}-%{version}.tar.bz2
29
30#Source1: pop3.pamd
31#Source2: imap.pamd
32#Source4: courier-imap.init
33#Source5: courier-imap-ssl.init
34#Source6: courier-pop.init
35#Source7: courier-pop-ssl.init
36#Source8: %{name}.firewall
37#Source9: %{name}-ssl.firewall
38
39Patch0: %{name}.diff
40#Patch2: %{name}-ulimit_conf.diff
41
42BuildRoot: %{_tmppath}/%{name}-%{version}-build
43%if 0%{?suse_version} > 910
44BuildRequires: audit-libs
45%endif
46BuildRequires: courier-authlib-devel
47#BuildRequires: fam-devel gcc-c++ gdbm-devel libstdc++-devel
48BuildRequires: db4-devel
49#BuildRequires: postfix procps
50BuildRequires: ncurses-devel openssl-devel zlib-devel
51# openssl itself for /usr/bin/openssl configure check
52BuildRequires: openssl
53Conflicts: imap qpopper cyrus-imapd
54Requires: courier-authlib
55#Requires: fam-server gdbm openssl
56Requires: openssl
57
58%description
59Courier-IMAP is a fast, scalable, enterprise IMAP server that uses
60Maildirs. Many E-mail service providers use Courier-IMAP to easy handle
61hundreds of thousands of mail accounts. With its built-in IMAP and POP3
62aggregation proxy, Courier-IMAP has practically infinite horizontal
63scalability. In a proxy configuration, a pool of Courier servers service
64initial IMAP and POP3 connections from clients. They wait to receive the
65client's log in request, look up the server that actually holds this mail
66account's mailbox, and establish a proxy connection to the server, all in
67a single, seamless process. Mail accounts can be moved between different
68servers, to achieve optimum resource usage.
69
70The only practical limitation on Courier-IMAP is available network and I/O
71bandwidth. If you are new to Courier-IMAP, this may sound a bit
72intimidating. But you do not need to tackle everything at once. Start by
73taking small, easy steps. Your first step will be to set up a small
74Courier-IMAP server, using it like any other traditional IMAP service, on
75a single server. After you gain experience and become comfortable with
76Courier, you can then begin exploring its advanced features.
77
78This is the same IMAP server that's included in the Courier mail server,
79but configured as a standalone IMAP server that can be used with other
80mail servers - such as Qmail, Exim, or Postfix - that deliver to maildirs.
81If you already have Courier installed, you do not need to download this
82version. If you install this version, you must remove it if you later
83install the entire Courier server.
84
85
86%prep
87%setup -q
88%patch0 -p1 -b .os2~
89
90%build
91
92export CONFIG_SHELL="/bin/sh"
93export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf"
94export LIBS="-lurpo"
95
96%configure \
97 --libexecdir=%{_prefix}/lib/%{name} \
98 --datadir=%{_datadir}/%{name} \
99 --sysconfdir=%{_sysconfdir}/%{name} \
100 --sharedstatedir=%{_sharedstatedir}/%{name} \
101 --with-piddir=%{_localstatedir}/run \
102 --disable-static \
103 --disable-root-check \
104 --enable-unicode \
105 --with-authdaemonvar=%{_localstatedir}/run/authdaemon.%{name} \
106 --with-certdb=%{_sysconfdir}/ssl/certs \
107 --with-certsdir=%{_sysconfdir}/ssl/private \
108 --enable-workarounds-for-imap-client-bugs \
109 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
110
111%{__make} %{?jobs:-j%jobs}
112
113%install
114%{__make} install DESTDIR=$RPM_BUILD_ROOT
115# Move daemons into sbin
116#%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/couriertls.exe $RPM_BUILD_ROOT%{_prefix}/sbin/
117%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/imapd.exe $RPM_BUILD_ROOT%{_prefix}/sbin/
118%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/pop3d.exe $RPM_BUILD_ROOT%{_prefix}/sbin/
119# Rename imapd.8 to courier-imapd.8
120%{__mv} $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}d.8
121# Install PAM config files
122#%{__install} -D -m 644 $RPM_SOURCE_DIR/pop3.pamd $RPM_BUILD_ROOT/etc/pam.d/pop3
123#%{__install} -D -m 644 $RPM_SOURCE_DIR/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/imap
124# Install init scripts
125#for i in imap imap-ssl pop pop-ssl ; do
126# %{__install} -D -m 0755 $RPM_SOURCE_DIR/courier-$i.init $RPM_BUILD_ROOT/etc/init.d/courier-$i
127# %{__ln_s} -f /etc/init.d/courier-$i $RPM_BUILD_ROOT%{_prefix}/sbin/rccourier-$i
128#done
129# Remove original init scripts, will not work longer
130%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/imapd.rc
131%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/imapd-ssl.rc
132%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/pop3d.rc
133%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/pop3d-ssl.rc
134#
135# Fix imapd.dist
136#
137%{__sed} -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/imapd.dist
138%{__sed} -i -e 's/^ADDRESS=.*/ADDRESS=127.0.0.1/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/imapd.dist
139%{__sed} -i -e 's/^MAXPERIP=.*/MAXPERIP=20/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/imapd.dist
140%{__sed} -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/imapd-ssl.dist
141%{__sed} -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/imapd-ssl.dist
142%{__sed} -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pop3d.dist
143%{__sed} -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pop3d-ssl.dist
144%{__sed} -i -e 's/^#\ \+\(TLS_CIPHER_LIST=.*\)/\1/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pop3d-ssl.dist
145# For %doc macro
146%{__install} -m 0644 imap/ChangeLog ChangeLog
147%{__install} -m 0644 imap/README README.imap
148%{__install} -m 0644 imap/README.proxy README.proxy
149%{__install} -m 0644 maildir/README.maildirquota.txt README.maildirquota
150%{__install} -m 0644 maildir/README.sharedfolders.txt README.sharedfolders
151%{__install} -D -m 0755 sysconftool $RPM_BUILD_ROOT%{_datadir}/%{name}/sysconftool
152%{__chmod} 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/sysconftool
153%{__cat} >$RPM_BUILD_ROOT%{_datadir}/%{name}/configlist <<EOF
154%{_sysconfdir}/courier/imapd.dist
155%{_sysconfdir}/courier/imapd-ssl.dist
156%{_sysconfdir}/courier/pop3d.dist
157%{_sysconfdir}/courier/pop3d-ssl.dist
158EOF
159#firewall script
160#%{__install} -D -m 644 %{S:8} $RPM_BUILD_ROOT%{_sysconfdir}/SuSEfirewall2.d/services/%{name}
161#%{__install} -D -m 644 %{S:9} $RPM_BUILD_ROOT%{_sysconfdir}/SuSEfirewall2.d/services/%{name}-ssl
162
163#%preun
164#for i in imap imap-ssl pop pop-ssl ; do
165# %stop_on_removal courier-$i
166#done
167#if [ "$1" = "0" ]; then
168# %{__rm} -f %{_localstatedir}/couriersslcache
169# %{__rm} -f %{_localstatedir}/imapd.pid
170# %{__rm} -f %{_localstatedir}/imapd-ssl.pid
171# %{__rm} -f %{_localstatedir}/imapd.pid.lock
172# %{__rm} -f %{_localstatedir}/imapd-ssl.pid.lock
173# %{__rm} -f %{_localstatedir}/pop3d.pid
174# %{__rm} -f %{_localstatedir}/pop3d-ssl.pid
175# %{__rm} -f %{_localstatedir}/pop3d.pid.lock
176# %{__rm} -f %{_localstatedir}/pop3d-ssl.pid.lock
177#fi
178
179#%post
180#%{_datadir}/%{name}/sysconftool `%{__cat} %{_datadir}/%{name}/configlist` >/dev/null
181
182#%postun
183#for i in imap imap-ssl pop pop-ssl ; do
184# %restart_on_update courier-$i
185#done
186#%insserv_cleanup
187
188%post
189%wps_object_create_begin
190COURIER_IMAPD:WPProgram|Courier Imap daemon|<COURIER_FOLDER>|EXENAME=((%{_prefix}/lib/%{name}/imapd.cmd));STARTUPDIR=((%{_prefix}/lib/%{name}));PARAMETERS=;TITLE=Courier Imap daemon;
191COURIER_POP3D:WPProgram|Courier Pop3 daemon|<COURIER_FOLDER>|EXENAME=((%{_prefix}/lib/%{name}/imapd.cmd));STARTUPDIR=((%{_prefix}/lib/%{name}));PARAMETERS=;TITLE=Courier Pop3 daemon;
192%wps_object_create_end
193
194%postun
195%wps_object_delete_all
196
197
198%clean
199%{__rm} -rf $RPM_BUILD_ROOT
200
201%files
202%defattr(-,root,root,755)
203%doc AUTHORS ChangeLog COPYING* imap/BUGS README README.imap README.maildirquota README.proxy
204%doc README.sharedfolders
205#%attr(755,root,root) /etc/init.d/courier-*
206#%config %attr(644,root,root) /etc/pam.d/imap
207#%config %attr(644,root,root) /etc/pam.d/pop3
208%dir %{_sysconfdir}/%{name}
209%config %attr(600,root,root) %{_sysconfdir}/%{name}/imap*
210%config %attr(600,root,root) %{_sysconfdir}/%{name}/pop3*
211%config %{_sysconfdir}/%{name}/quotawarnmsg.example
212%dir %{_prefix}/lib/%{name}
213%{_prefix}/lib/%{name}/makedatprog.exe
214%{_prefix}/lib/%{name}/couriertcpd.exe
215%{_bindir}/*
216%{_sbindir}/*
217%{_mandir}/man?/*
218%dir %{_datadir}/%{name}/
219%{_datadir}/%{name}/*
220#%dir %{_sysconfdir}/SuSEfirewall2.d
221#%dir %{_sysconfdir}/SuSEfirewall2.d/services
222#%config %{_sysconfdir}/SuSEfirewall2.d/services/%{name}
223#%config %{_sysconfdir}/SuSEfirewall2.d/services/%{name}-ssl
224
225%changelog
Note: See TracBrowser for help on using the repository browser.