Pigeonhole – kompilacja i instalacja

dovecotPigeonhole dla serwera Dovecot można ściągnąć z http://pigeonhole.dovecot.org/download.html

% wget http://www.rename-it.nl/dovecot/2.1/dovecot-2.1-pigeonhole-0.3.1.tar.gz
% tar -xf dovecot-2.1-pigeonhole-0.3.1.tar.gz

Poniżej mój skrypt do konfiguracji i kompilacji Pigeonhole 0.3.1 dla Dovecota 2.1:

#!/bin/sh
#

# for GCC:
#CC=gcc
#CFLAGS="-O2 -mcpu=v9"
#MAKE=gmake
#
# for Sun Studio
CC=cc
CXX=CC
CFLAGS="-xtarget=native -xO3 -xautopar"
CXXFLAGS=$CFLAGS
CPPFLAGS="-I/usr/local/openldap/include -I/usr/local/ssl/include -I/usr/local/include"
#LDFLAGS="-L/usr/local/lib -R/usr/local/lib"
LDFLAGS="-L/usr/local/openldap/lib -R/usr/local/openldap/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/lib -R/usr/local/lib"
MAKE=dmake
#DMAKE_MODE=serial

export CC CFLAGS CPPFLAGS MAKE DMAKE_MODE
export CXX CXXFLAGS LDFLAGS LIBS

# $CC -v
$CC -V
set|grep PATH
set|grep FLAGS

DIR="dovecot-2.1-pigeonhole"
VER="0.3.1"
DOVECOT="dovecot-2.1.8"

cd $DIR-$VER

tn="n"
echo "============================================="
echo "$MAKE clean [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
  $MAKE distclean || $MAKE realclean || $MAKE clean

  rm -f config.status
  rm -f config.log
fi;

tn="n"
echo "============================================="
echo "configure [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
	./configure \
	--prefix=/usr/local/$DOVECOT \
	--infodir=/usr/local/info --mandir=/usr/local/man \
	--with-dovecot="../$DOVECOT" \

fi;

tn="n"
echo "============================================="
echo "$MAKE [y|n] ?"
read tn
if [ "$tn" = "Y" ] || [ "$tn" = "y" ]; then
  $MAKE && echo "Compillation successful"
fi;

Konfiguracja i kompilacja:

% ./drf_sieve-0.3.1_conf
cc: Sun C 5.10 SunOS_sparc 2009/06/03
usage: cc [ options] files.  Use 'cc -flags' for details
MANPATH=/usr/local/share/man:/usr/local/man:/usr/share/man
PATH=/usr/local/bin:/usr/bin:/usr/ccs/bin
CFLAGS=-xtarget=native -xO3 -xautopar
CPPFLAGS=-I/usr/local/openldap/include -I/usr/local/ssl/include -I/usr/local/include
CXXFLAGS=-xtarget=native -xO3 -xautopar
LDFLAGS=-L/usr/local/openldap/lib -R/usr/local/openldap/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/lib -R/usr/local/lib
=============================================
dmake clean [y|n] ?
n
=============================================
configure [y|n] ?
y
checking for a BSD-compatible install... /usr/local/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/mkdir -p
checking for gawk... gawk
checking whether dmake sets $(MAKE)... yes
...
config.status: creating pigeonhole-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
=============================================
dmake [y|n] ?
y
dmake  all-recursive
Making all in src
Making all in lib-sieve
Making all in plugins
Making all in vacation
source='cmd-vacation.c' object='cmd-vacation.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../../../../depcomp \
/bin/bash ../../../../libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I. -I../../../..   -I./../../  -I/home/soft/dovecot/dovecot-2.1.8 -I/home/soft/dovecot/dovecot-2.1.8/src/lib -I/home/soft/dovecot/dovecot-2.1.8/src/lib-dict -I/home/soft/dovecot/dovecot-2.1.8/src/lib-dns -I/home/soft/dovecot/dovecot-2.1.8/src/lib-mail -I/home/soft/dovecot/dovecot-2.1.8/src/lib-imap -I/home/soft/dovecot/dovecot-2.1.8/src/lib-fs -I/home/soft/dovecot/dovecot-2.1.8/src/lib-charset -I/home/soft/dovecot/dovecot-2.1.8/src/lib-index -I/home/soft/dovecot/dovecot-2.1.8/src/lib-storage -I/home/soft/dovecot/dovecot-2.1.8/src/lib-storage/index -I/home/soft/dovecot/dovecot-2.1.8/src/lib-storage/index/raw -I/usr/local/openldap/include -I/usr/local/ssl/include -I/usr/local/include  -xO3 -xautopar -c -o cmd-vacation.lo cmd-vacation.c
...
Making all in example-config
Making all in conf.d
Making all in rfc
dmake: Fatal error in reader: Makefile, line 392: Unexpected end of line seen

Jeśli zobaczysz komunikat błędu jak wyżej, należy zmienić make (tutaj było użyte dmake) na GNU make (gmake) i skompilować ponownie:

% gsed -i "s/^MAKE=dmake/MAKE=gmake/" drf_sieve-0.3.1_conf
% ./drf_sieve-0.3.1_conf

Instalacja po su (lub sudo).

Możesz również polubić…

Leave a Reply

Witryna wykorzystuje Akismet, aby ograniczyć spam. Dowiedz się więcej jak przetwarzane są dane komentarzy.