| 111 | variant sieve description {Enable LDA sieve extension} { |
| 112 | global sieve_version sieve_distname sieve_worksrcpath |
| 113 | |
| 114 | set sieve_version 0.1.15 |
| 115 | master_sites-append http://www.rename-it.nl/dovecot/${branch}:sieve |
| 116 | set sieve_distname ${name}-${branch}-sieve-${sieve_version} |
| 117 | distfiles-append ${sieve_distname}${extract.suffix}:sieve |
| 118 | |
| 119 | checksums-append ${sieve_distname}${extract.suffix} \ |
| 120 | md5 2246fbbcf304d3ec1df0db2d091fe05a \ |
| 121 | sha1 2827df60028639ec15422a86f48a1c9b2a78431a \ |
| 122 | rmd160 7fd3d23d5ef93d443cdedc8512dab649b2a99694 \ |
| 123 | |
| 124 | extract.only-append ${sieve_distname}${extract.suffix} |
| 125 | |
| 126 | set sieve_worksrcpath ${workpath}/${sieve_distname} |
| 127 | |
| 128 | # There has been a compile problem with sieve 0.1.15, remove this on next version increment |
| 129 | post-patch { |
| 130 | system "cd ${sieve_worksrcpath} && patch -b -p1 < ${filespath}/patch-sieve-0.1.15-extern.diff" |
| 131 | } |
| 132 | |
| 133 | post-configure { |
| 134 | global sieve_worksrcpath |
| 135 | |
| 136 | # dovecot-sieve needs dovecot-config |
| 137 | system "cd ${worksrcpath} && make dovecot-config" |
| 138 | |
| 139 | set configure_dir_save ${configure.dir} |
| 140 | set configure_args_save ${configure.args} |
| 141 | configure.dir ${sieve_worksrcpath} |
| 142 | configure.args --with-dovecot=${worksrcpath} |
| 143 | |
| 144 | if {[catch {command_exec configure} result]} { |
| 145 | return -code error "configure sieve failed: $result" |
| 146 | } |
| 147 | |
| 148 | configure.dir ${configure_dir_save} |
| 149 | configure.args ${configure_args_save} |
| 150 | } |
| 151 | |
| 152 | post-build { |
| 153 | global sieve_worksrcpath |
| 154 | |
| 155 | set build_dir_save ${build.dir} |
| 156 | build.dir ${sieve_worksrcpath} |
| 157 | |
| 158 | if {[catch {command_exec build} result]} { |
| 159 | return -code error "build sieve failed: $result" |
| 160 | } |
| 161 | |
| 162 | build.dir ${build_dir_save} |
| 163 | } |
| 164 | |
| 165 | post-destroot { |
| 166 | global sieve_worksrcpath |
| 167 | |
| 168 | set destroot_dir_save ${destroot.dir} |
| 169 | destroot.dir ${sieve_worksrcpath} |
| 170 | |
| 171 | if {[catch {command_exec destroot} result]} { |
| 172 | return -code error "destroot sieve failed: $result" |
| 173 | } |
| 174 | |
| 175 | destroot.dir ${destroot_dir_save} |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | variant managesieve requires sieve description {Enable managesieve} { |
| 180 | global managesieve_version managesieve_distname managesieve_patch managesieve_worksrcpath dovecot_worksrcpath |
| 181 | |
| 182 | set managesieve_version 0.11.11 |
| 183 | master_sites-append http://www.rename-it.nl/dovecot/${branch}:managesieve |
| 184 | set managesieve_distname ${name}-${branch}-managesieve-${managesieve_version} |
| 185 | set managesieve_patch ${name}-${version}-managesieve-${managesieve_version}.diff |
| 186 | distfiles-append ${managesieve_distname}${extract.suffix}:managesieve \ |
| 187 | ${managesieve_patch}.gz:managesieve |
| 188 | |
| 189 | checksums-append ${managesieve_distname}${extract.suffix} \ |
| 190 | md5 32ba8d47a3695f8514bd2c2bf7348f96 \ |
| 191 | sha1 53f8618a9e02f953912390a7b803eb6218bf969a \ |
| 192 | rmd160 161d143f5a42aee929abf51b62b3b0e6e7a9f07a \ |
| 193 | ${managesieve_patch}.gz \ |
| 194 | md5 d773909c5da6ccab092818cf691237bd \ |
| 195 | sha1 f27d32144e6db35715ac9de3acd7a7d8948f3323 \ |
| 196 | rmd160 bfd7593b8ffa36ac6062e0ff147c9759447d6352 |
| 197 | |
| 198 | extract.only-append ${managesieve_distname}${extract.suffix} |
| 199 | |
| 200 | set managesieve_worksrcpath ${workpath}/${managesieve_distname} |
| 201 | set dovecot_worksrcpath ${workpath}/${name}-${version} |
| 202 | |
| 203 | # managesieve requires a patched dovecot, remove for soon to be released dovecot 2.x |
| 204 | post-patch { |
| 205 | system "cd ${workpath}/${name}-${version} && gunzip -dc ${distpath}/dovecot-${version}-managesieve-${managesieve_version}.diff.gz | patch -b -p1" |
| 206 | } |
| 207 | |
| 208 | post-configure { |
| 209 | global managesieve_worksrcpath |
| 210 | |
| 211 | set configure_dir_save ${configure.dir} |
| 212 | set configure_args_save ${configure.args} |
| 213 | configure.dir ${managesieve_worksrcpath} |
| 214 | configure.args --with-dovecot=${worksrcpath} \ |
| 215 | --with-dovecot-sieve=${sieve_worksrcpath} |
| 216 | |
| 217 | if {[catch {command_exec configure} result]} { |
| 218 | return -code error "configure managesieve failed: $result" |
| 219 | } |
| 220 | |
| 221 | configure.dir ${configure_dir_save} |
| 222 | configure.args ${configure_args_save} |
| 223 | } |
| 224 | |
| 225 | post-build { |
| 226 | global managesieve_worksrcpath |
| 227 | |
| 228 | set build_dir_save ${build.dir} |
| 229 | build.dir ${managesieve_worksrcpath} |
| 230 | |
| 231 | if {[catch {command_exec build} result]} { |
| 232 | return -code error "build managesieve failed: $result" |
| 233 | } |
| 234 | |
| 235 | build.dir ${build_dir_save} |
| 236 | } |
| 237 | |
| 238 | post-destroot { |
| 239 | global managesieve_worksrcpath |
| 240 | |
| 241 | set destroot_dir_save ${destroot.dir} |
| 242 | destroot.dir ${managesieve_worksrcpath} |
| 243 | |
| 244 | if {[catch {command_exec destroot} result]} { |
| 245 | return -code error "destroot managesieve failed: $result" |
| 246 | } |
| 247 | |
| 248 | destroot.dir ${destroot_dir_save} |
| 249 | } |
| 250 | } |