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