-
Notifications
You must be signed in to change notification settings - Fork 0
/
cyrus-build.sh
executable file
·37 lines (33 loc) · 1.01 KB
/
cyrus-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
c=${1:-$(buildah from base-build)}
version=${2:-"3.2.12"}
dist="https://github.com/cyrusimap/cyrus-imapd/releases/download/cyrus-imapd-$version/cyrus-imapd-$version.tar.gz"
buildah run $c zypper in -ly \
cyrus-sasl-devel \
libchardet-devel \
libicu-devel \
libjansson-devel \
libopenssl-devel \
libuchardet-devel \
perl-Authen-SASL-Cyrus \
openldap2-devel \
sqlite3-devel
buildah run $c zypper clean -a
curl -sLo - $dist |
buildah run --workingdir /usr/src $c tar -zxf -
buildah run $c install -d -m 755 -o root -g root /target
buildah run --workingdir /usr/src/cyrus-imapd-$version $c sh <<EOF
./configure \
--prefix=/usr \
--libexecdir=/usr/lib/cyrus-imapd \
--enable-autocreate \
--enable-idled \
--with-ldap \
--with-sqlite \
--without-snmp && \
DESTDIR=/target make install && \
for dir in perl/annotator perl/imap perl/sieve/managesieve;
do ( cd \$dir ; make DESTDIR=/target install ); done && \
cd tools && install masssievec mkimap translatesieve /target/usr/bin/
EOF
buildah commit $c $(basename -s .sh $0)