]> git.pld-linux.org Git - packages/courier-imap.git/blob - courier-imap.spec
- release 2: added rc-scripts to Prereq for all subpackages.
[packages/courier-imap.git] / courier-imap.spec
1 Summary:        Courier-IMAP server
2 Name:           courier-imap
3 Version:        1.3.2
4 Release:        2
5 License:        GPL
6 Group:          Networking/Daemons
7 Group(de):      Netzwerkwesen/Server
8 Group(pl):      Sieciowe/Serwery
9 Source0:        http://www.inter7.com/courierimap/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}-pop3.init
12 Source3:        %{name}-authdaemon.init
13 Source4:        %{name}.pamd
14 Source5:        %{name}-pop3.pamd
15 Source6:        %{name}.sysconfig
16 Source7:        %{name}-pop3.sysconfig
17 Source8:        %{name}-authdaemon.sysconfig
18 URL:            http://www.inter7.com/courierimap/
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Prereq:         rc-scripts
21 Requires:       %{name}-common = %{version}
22 Provides:       imapdaemon
23 Obsoletes:      imapdaemon
24
25 %define         _libexecdir     /usr/lib/courier-imap
26 %define         _sysconfdir     /etc/courier-imap
27
28 %description
29 Courier-IMAP is an IMAP server for Maildir mailboxes.
30
31 %description -l pl
32 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
33
34 %package common
35 Summary:        Common files for imap and pop daemons.
36 Group:          Networking/Daemons
37 Group(de):      Netzwerkwesen/Server
38 Group(pl):      Sieciowe/Serwery
39 Prereq:         rc-scripts
40
41 %description common
42 Common files for imap and pop daemons.
43
44 %description -l pl common
45 Pliki wspólne dla serwerów imap i pop.
46
47 %package pop3
48 Summary:        Courier-IMAP POP3 Server
49 Group:          Networking/Daemons
50 Group(de):      Netzwerkwesen/Server
51 Group(pl):      Sieciowe/Serwery
52 Requires:       %{name}-common = %{version}
53 Prereq:         rc-scripts
54 Provides:       pop3daemon
55 Obsoletes:      pop3daemon
56
57 %description pop3
58 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
59
60 %description -l pl pop3
61 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
62
63 %prep
64 %setup -q
65
66 %build
67 %configure \
68         --with-authdaemonvar=/var/lib/authdaemon
69 %{__make}
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig}
74
75 %{__make} install DESTDIR=$RPM_BUILD_ROOT
76
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
78 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
79 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
80
81 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
82 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
83
84 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
85 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
86 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
87
88 rm -rf  $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
89         $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
90
91 mv -f imap/README README.imap
92 mv -f maildir/README.maildirquota.txt README.maildirquota
93
94 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/authdaemonrc.dist \
95         $RPM_BUILD_ROOT%{_sysconfdir}/authdaemonrc
96 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/authldaprc.dist \
97         $RPM_BUILD_ROOT%{_sysconfdir}/authldaprc
98 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/authmysqlrc.dist \
99         $RPM_BUILD_ROOT%{_sysconfdir}/authmysqlrc
100 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
101         $RPM_BUILD_ROOT%{_sbindir}
102 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
103         $RPM_BUILD_ROOT%{_sbindir}
104
105 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
106 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
107 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
108 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
109 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
110 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
111 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
112 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
113 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8
114 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8
115 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
116 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
117
118 gzip -9nf README* imap/BUGS AUTHORS COPYING
119
120 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
121
122 %post
123 /sbin/chkconfig --add courier-imap
124
125 if [ -f /var/lock/subsys/courier-imap ]; then
126         /etc/rc.d/init.d/courier-imap restart >&2
127 else
128         echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
129 fi
130
131 %preun
132 if [ "$1" = "0" ]; then
133         if [ -f /var/lock/subsys/courier-imap ]; then
134                 /etc/rc.d/init.d/courier-imap stop >&2
135         fi
136         /sbin/chkconfig --del courier-imap
137 fi
138
139 %post common
140 /sbin/chkconfig --add authdaemon
141
142 if [ -f /var/lock/subsys/authdaemon ]; then
143         /etc/rc.d/init.d/authdaemon restart >&2
144 else
145         echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
146 fi
147
148 %preun common
149 if [ "$1" = "0" ]; then
150         if [ -f /var/lock/subsys/authdaemon ]; then
151                 /etc/rc.d/init.d/authdaemon stop >&2
152         fi
153
154         /sbin/chkconfig --del authdaemon
155 fi
156
157 %post pop3
158 /sbin/chkconfig --add courier-imap-pop3
159
160 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
161         /etc/rc.d/init.d/courier-imap-pop3 restart >&2
162 else
163         echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
164 fi
165
166 %preun pop3
167 if [ "$1" = "0" ]; then
168         if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
169                 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
170         fi
171         /sbin/chkconfig --del courier-imap
172 fi
173
174 %clean
175 rm -rf $RPM_BUILD_ROOT
176
177 %files
178 %defattr(644,root,root,755)
179 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
180 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
181 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
182 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
183 %{_sysconfdir}/imapd.cnf
184 %attr(755,root,root) %{_bindir}/imapd
185 %attr(755,root,root) %{_sbindir}/imaplogin
186 %attr(755,root,root) %{_sbindir}/mkimapdcert
187
188 %files common
189 %defattr(644,root,root,755)
190 %doc *.gz imap/*.gz
191 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
192 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
193 %attr(750,root,root) %dir %{_sysconfdir}
194 %dir %{_libexecdir}
195 %dir %{_libexecdir}/authlib
196 %{_sysconfdir}/authdaemonrc
197 %{_sysconfdir}/authldaprc
198 %{_sysconfdir}/authmysqlrc
199 %{_sysconfdir}/quotawarnmsg.example
200 %attr(755,root,root) %{_bindir}/couriertls
201 %attr(755,root,root) %{_bindir}/maildirmake
202 %attr(755,root,root) %{_sbindir}/makeuserdb
203 %attr(755,root,root) %{_sbindir}/pw2userdb
204 %attr(755,root,root) %{_sbindir}/userdb
205 %attr(755,root,root) %{_sbindir}/userdbpw
206 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
207 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
208 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.*
209 %attr(755,root,root) %{_libexecdir}/couriertcpd
210 %attr(755,root,root) %{_libexecdir}/deliverquota
211 %attr(755,root,root) %{_libexecdir}/logger
212 %attr(755,root,root) %{_libexecdir}/makedatprog
213 %{_mandir}/man*/*
214
215 %files pop3
216 %defattr(644,root,root,755)
217 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
218 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
219 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
220 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
221 %attr(755,root,root) %{_bindir}/pop3d
222 %attr(755,root,root) %{_sbindir}/mkpop3dcert
223 %attr(755,root,root) %{_sbindir}/pop3login
224 %{_sysconfdir}/pop3d.cnf
This page took 0.047908 seconds and 4 git commands to generate.