updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / qmail / PKGBUILD~
blobf2ad19e88da8f34b097fba6b32cffd89d13235e6
1 # Contributor: Roberto Alsina <ralsina@kde.org>
2 pkgname=qmail
3 pkgver=1.03
4 pkgrel=2
5 pkgdesc="The second most popular MTA in the internet"
6 url="http://www.qmail.org"
7 license="Free"
8 depends=('glibc' 'ipsvd' 'runit' 'checkpassword-pam' 'ucspi-ipc')
9 makedepends=()
10 conflicts=()
11 replaces=()
12 backup=()
13 arch=('i686')
14 provides=('qmail')
15 install=qmail.install
16 source=(http://cr.yp.to/software/$pkgname-$pkgver.tar.gz        \
17       syncdir.c                                                 \
18       qmail-1.03-errno.patch                                    \
19       qmail-1.03-msglog.patch                                   \
20       qmtpd-badmailfrom-1.1.patch                               \
21       qmail-1.03-showctl.patch                                  \
22       qmail-1.03-bind-interface.patch                           \
23       big-todo.patch                                            \
24       qmail-1.03-install-path-big-todo.patch                    \
25       qmail-1.03-autouidgid.patch                               \
26       qmail-1.03-syncdir.patch                                  \
27       qmail-1.03-pop3d-stat.patch                               \
28       qmail-1.03-queuevar.patch                                 \
29       big-concurrency.patch                                     \
30       qmail-1.03-qmtpc-mailroutes-1.5.patch                     \
31       qmail-0.0.0.0.patch                                       \
32       ext_todo-20030105.patch                                   \
33       ext_todo-20020524-add-big-todo.patch                      \
34       netqmail-1.05-ucspitls-0.3.patch                          \
35       qmail-1.03-quotas-1.1.patch                               \
36       qmail-maildir++-universal.patch                           \
37       qmail-queue-custom-error.patch                            \
38       qmail-authentication-064.patch                            \
39       qmail-remote-auth.patch                                   \
40       qmail-1.03-bigdns.patch                                   \
41       qmail-1.03-rfc2821.patch                                  \
42       qmail-1.03-doublebounce-trim.patch                        \
43       qmail-1.03-spp.patch                                      \
44       http://qmail.jms1.net/patches/qmail-date-localtime.patch  \
45       http://www.netmeridian.com/e-huss/queue-fix.tar.gz        \
46       http://www.qmail.org/queue-fix-todo.patch                 \
47       queue-fix-errno.patch                                     \
48       qmail-rhconfig                                            \
49       datemail                                                  \
50       mailq                                                     \
51       run-functions                                             \
52       makerules                                                 \
53       services.tar.gz
54       )
56 md5sums=('622f65f982e380dbe86e6574f3abcb7c'
57          'f9e69afdf7fe0bc8547c865919b01bb3'
58          '1806b4cc25597e106a9e8e27ac62a03c'
59          '76f2ed581176aa906b507435cc416cf8'
60          '34d59d4e93897790055d562788623b21'
61          '904ec650848677bcbfe6ad1d0f55c5a4'
62          '8bb5e1a76d346a7062e3f57b10df5f85'
63          'ce3d1fadcf441c434479d91455b60adf'
64          '5268d64e0de60eb1bc06abfb0399db78'
65          'f8d8a58273c557960317e30652ad43df'
66          '2e39d7a056cf33e7467029c50d985954'
67          'c3d8d7dc9db4588f8573e07dd59382e8'
68          '2c4ef26ddc2b3614c2972765365883ae'
69          '66fdd0cf5e49f87b5134d076946d0cf3'
70          '821dff356c9dbca644ba3956e86acdcf'
71          '8edda59102180973dd1bb546da7de160'
72          '9ff2f52db53242da0a196bc4fedbae62'
73          'bd8d874604e39d7994408be5b5049bbb'
74          '9543ab0ac2ece0540a822b43edeeec16'
75          '8ef1833aa2b063470099c0c309a529df'
76          'fa77cf624461f30e37c1adc20a7ab651'
77          '88c05425b8c20d748ab85739d8ffeb28'
78          '88333425eb93f87c2567e666cde46d78'
79          'acdb8621767165598baaf7b69136e0e2'
80          'e1d696cd2762b525c6f7ba1d302b97c5'
81          'a554edeafd43df65f2ce868e73b28d38'
82          '9f726c6e7f846424c233fed0587ab530'
83          '38890e2abc26d2fa0a2c8180b5089d69'
84          'd566e8bd99b33efee0194e855b8d6995'
85          '43f915c104024e6f33a5b3ff52dfb75b'
86          'cbebb217b1b3b32f20995f2c869f6121'
87          'cb4fef6f8d2003661632a8395f8430f3'
88          '8252e1212c97aab8da6640992ff92661'
89          'fb9e338b59358ab85fe9691588c83ab4'
90          '306b60c140a8a8104b397d31fa5e455f'
91          '254ae5d0d8fe333bb76be470e9b9acd3'
92          'fa20700c5b781f874bfa18afc4bbcc64'
93          '84e67354be30817933976df76a7e66ff')
95 build() {
96   
97 install -d $startdir/pkg/usr/bin $startdir/pkg/usr/sbin
98   
99 ###############################################
100 ## Build queue-fix
101 ###############################################
103   cd $startdir/src/queue-fix-1.4
104   patch -p1 < ../queue-fix-todo.patch  || return 1
105   patch -p1 -R < ../queue-fix-errno.patch  || return 1
106   make || return 1
107   install -m 0755 queue-fix $startdir/pkg/usr/bin
109 ###############################################
110 ## Build qmail
111 ###############################################
113   cd $startdir/src/$pkgname-$pkgver
114   
115   # Patch to fix compilation on modern Linux
116   patch -p1 < ../qmail-1.03-errno.patch || return 1
117   # If you enable this one, a copy of every mail will  be 
118   # sent to the msglog account 
119   #patch -p1 < ../qmail-1.03-msglog.patch || return 1 
120   patch -p1 < ../qmtpd-badmailfrom-1.1.patch || return 1
121   patch -p1 < ../qmail-1.03-showctl.patch  || return 1
122   patch -p1 < ../qmail-1.03-bind-interface.patch || return 1
123   patch -p1 < ../big-todo.patch || return 1
124   patch -p1 < ../qmail-1.03-install-path-big-todo.patch || return 1 
125   patch -p1 < ../qmail-1.03-autouidgid.patch || return 1
126   patch -p1 < ../qmail-1.03-syncdir.patch || return 1
127   patch -p1 < ../qmail-1.03-pop3d-stat.patch || return 1
128   patch -p1 < ../qmail-1.03-queuevar.patch || return 1 
129   patch -p1 < ../big-concurrency.patch || return 1
130   patch -p1 < ../qmail-1.03-qmtpc-mailroutes-1.5.patch || return 1
131   patch -p1 < ../qmail-0.0.0.0.patch || return 1
132   patch -p1 < ../ext_todo-20030105.patch || return 1
133   patch -p1 < ../ext_todo-20020524-add-big-todo.patch || return 1
134   patch -p1 < ../netqmail-1.05-ucspitls-0.3.patch || return 1
135   patch -p1 < ../qmail-1.03-quotas-1.1.patch || return 1
136   patch -p1 < ../qmail-maildir++-universal.patch || return 1
137   patch -p1 < ../qmail-queue-custom-error.patch || return 1
138   patch -p1 < ../qmail-authentication-064.patch || return 1 
139   patch -p1 < ../qmail-remote-auth.patch || return 1 
140   patch -p1 < ../qmail-1.03-bigdns.patch || return 1 
141   patch -p1 < ../qmail-1.03-rfc2821.patch || return 1 
142   patch -p1 < ../qmail-1.03-doublebounce-trim.patch || return 1 
143   patch -p1 < ../qmail-1.03-spp.patch || return 1
144   # Changes dates in headers to localtime 
145   patch -p1 < ../qmail-date-localtime.patch || return 1
147   fds=`ulimit -n`
148   let spawnlimit='(fds-6)/2'
149   echo $spawnlimit >conf-spawn
151   cp ../syncdir.c .
152   
153   make compile makelib
154   ./compile syncdir.c
155   ./makelib libsyncdir.a syncdir.o
156   make it man
159 for BIN in      bouncesaying    \
160                 condredirect    \
161                 ../datemail     \
162                 elq             \
163                 except          \
164                 forward         \
165                 ipmeprint       \
166                 maildir2mbox    \
167                 maildirmake     \
168                 maildirwatch    \
169                 mailsubj        \
170                 make-owners     \
171                 pinq            \
172                 predate         \
173                 preline         \
174                 qail            \
175                 qbiff           \
176                 qmail-inject    \
177                 qmail-pop3d     \
178                 qmail-qmqpc     \
179                 qmail-qmqpd     \
180                 qmail-qmtpd     \
181                 qmail-qread     \
182                 qmail-qstat     \
183                 qmail-showctl   \
184                 qmail-smtpd     \
185                 qmail-tcpok     \
186                 qmail-tcpto     \
187                 qreceipt        \
188                 qsmhook         \
189                 ../qmail-rhconfig       \
190                 tcp-env         \
191                 ../mailq        \
192                 ../makerules
195         install -m 0755 $BIN $startdir/pkg/usr/bin 
196 done
198 for BIN in      qmail-clean     \
199                 qmail-getpw     \
200                 qmail-local     \
201                 qmail-pw2u      \
202                 qmail-remote    \
203                 qmail-rspawn    \
204                 qmail-send      \
205                 qmail-todo      \
206                 splogger        
208         install -m 0711 $BIN $startdir/pkg/usr/bin 
209 done
211 for BIN in      qmail-lspawn    \
212                 qmail-newmrh    \
213                 qmail-newu      \
214                 qmail-popup     \
215                 qmail-start     
217         install -m 0700 $BIN $startdir/pkg/usr/bin 
218 done
220 install -m 4711 qmail-queue $startdir/pkg/usr/bin
222 install -m 0755 sendmail $startdir/pkg/usr/sbin
224 install -d $startdir/pkg/etc/qmail/{alias,control,users,owners,plugins}
225 install -d $startdir/pkg/var/qmail/
227 # Set up all the symlinks so regular qmail users find their stuff
228 ln -s /etc/qmail/{alias,control,users,owners,plugins} $startdir/pkg/var/qmail/ 
229 ln -s /usr/bin $startdir/pkg/var/qmail/bin
230 ln -s /usr/man $startdir/pkg/var/qmail/man
232 rm error.3
233 for N in 0 1 3 5 7 8 9
235         install -d $startdir/pkg/usr/man/man$N
236         install -m 0644 *.$N $startdir/pkg/usr/man/man$N
237 done
239 # Shell script helper
241 install -d $startdir/pkg/usr/share/qmail
242 install -m 644 ../run-functions $startdir/pkg/usr/share/qmail 
244 # smtpplugins file
245 touch $startdir/pkg/etc/qmail/control/smtpplugins
247 # runit services
249   install -d $startdir/pkg/etc/sv
250   cd $startdir/src/services
251   cp -Rv * $startdir/pkg/etc/sv