-
Notifications
You must be signed in to change notification settings - Fork 0
/
cyrus-sasl
51 lines (33 loc) · 1.17 KB
/
cyrus-sasl
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
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
export CFLAGS=-"O2"
export CXXFLAGS="-O2"
PKG_VER=2.1.28
URL=https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-$PKG_VER/cyrus-sasl-$PKG_VER.tar.gz
TAR=$(echo $URL | sed -r 's|(.*)/||')
DIR=$(echo $TAR | sed 's|.tar.*||g')
PACKAGE=$(echo $DIR | sed 's|-[^-]*$||g')
# Get Package
cd /blfs/builds
wget $URL
tar -xvf $TAR
cd $DIR
# Build
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-auth-sasldb \
--with-dbpath=/var/lib/sasl/sasldb2 \
--with-sphinx-build=no \
--with-saslauthd=/var/run/saslauthd &&
make -j1
# Install
install -v -dm755 /pkgs/$PACKAGE/usr/share/doc/cyrus-sasl-$PKG_VER/html &&
install -v -m644 saslauthd/LDAP_SASLAUTHD /pkgs/$PACKAGE/usr/share/doc/cyrus-sasl-$PKG_VER &&
install -v -m644 doc/legacy/*.html /pkgs/$PACKAGE/usr/share/doc/cyrus-sasl-$PKG_VER/html &&
install -v -dm700 /var/lib/sasl
sudo make DESTDIR=/pkgs/$PACKAGE install
cd /pkgs
sudo echo "berkeley-db" > /pkgs/$PACKAGE/depends
sudo tar -cvzpf $PACKAGE.tar.xz $PACKAGE
sudo cp $PACKAGE.tar.xz /finished
cd /blfs/builds
sudo rm -r $DIR