dovecot-sieve

Bradley Giesbrecht brad at pixilla.com
Tue Dec 22 12:34:20 PST 2009


On Dec 22, 2009, at 10:07 AM, Bradley Giesbrecht wrote:

> Hi,
>
>
> I'm building a Portfile for dovecot-sieve and to get the dovecot- 
> sieve command line tools I also need to download the dovecot sources.
>
> How do I add an additional download to my Portfile so the sources  
> end up in the work directory?
>
> Also, I'd prefer to grab the same version that 'port download  
> dovecot' would download. In my situation I'm building a newer  
> version of dovecot then is in MacPorts.
>
>
> So this is what the work dir would look like:
>
> ./work/dovecot-1.2-sieve-0.1.14
> ./work/dovecot-1.2.9

I know there is a desire to reduce variants in MacPorts but dovecot- 
sieve seems a prime candidate for a variant.

To get the command line tools of dovecot-sieve you need the dovecot  
compiled sources dir and pass that to configure.

http://wiki.dovecot.org/LDA/Sieve/Dovecot
Compiling
Compilation is identical among the CMUSieve and the new Sieve plugin.  
Use --with-dovecot=<path> to point to dovecot-config file's directory.  
There are two possibilities where this could exist:
	•
If you configured Dovecot with --enable-header-install, you'll have  
dovecot-config installed in $prefix/lib/dovecot/ directory. For example:
./configure --with-dovecot=/usr/local/lib/dovecot make sudo make install
	• Compiled Dovecot sources' root directory. For example:
./configure --with-dovecot=../dovecot-1.2.0/ make make install
If you downloaded the sources using Mercurial, you will need to  
execute ./autogen.sh first to build the automake structure in your  
source tree. This process requires autotools and libtool to be  
installed.
Dovecot Sieve includes several command line tools to perform tasks  
such as compile, verify and debug Sieve scripts (refer to the README  
file for more information). These are built only if you use method 2,  
because they need to link Dovecot's .a libraries, which can only be  
found from Dovecot's source tree (make install doesn't install them).



Currently I'm downloading the dovecot sources, doing an extract.only  
for dovecot-sieve and then this in post-extract:

post-extract	{
	system "cd ${workpath} && tar xzf ${distpath}/dovecot-$ 
{dovecot_minor_version}.tar.gz"
	system "cd ${workpath}/dovecot-${dovecot_minor_version} && ./ 
configure --prefix=${prefix} && make"
}

I borrowed this from the i386-elf-gcc port.

I submitted a new port for dovecot-sieve and dovecot which appears to  
build clean on my system. I am currently using the new dovecot 1.2.9  
port and it seems to be working fine.

I have not worked with teh dovecot-sieve tools but as I said they  
build clean and the command line tools I checked out execute without  
error other then complaining for lack of input. I haven't actually  
tested any sieve-scripts yet.


// Brad


More information about the macports-dev mailing list