source: trunk/dports/mail/rspamd/Portfile

Last change on this file was 134312, checked in by pixilla@…, 3 years ago

mail/rspamd:

  • Use http to get around buildbot ssl errors.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 134312 2015-03-22 03:49:16Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7
8github.setup        vstakhov rspamd 0.8.3
9
10version             0.8.3
11categories          mail
12license             BSD
13maintainers         pixilla openmaintainer
14platforms           darwin
15description         Rspamd filtering system is created as a replacement of popular spamassassin \
16                    spamd and is designed to be fast, modular and easily extendable system.
17long_description    ${description}  Rspamd core is written in C language using event driven \
18                    paradigma. Plugins for rspamd can be written in lua. Rspamd is designed to \
19                    process connections completely asynchronous and do not block anywhere in code.
20homepage            http://rspamd.com
21
22if {${github.version} eq ${version}} {
23    master_sites        http://rspamd.com/downloads
24    use_xz              yes
25    checksums           rmd160  dc43a24c9eef555bd390ab31c4aa1deb8c5e7704 \
26                        sha256  20f788b08406fdaa8148d726e7ba18940108afff2d48b4f47726e3f2a6a88daf
27} else {
28    fetch.type          git
29    post-fetch {
30        system -W ${worksrcpath} "git submodule update --init"
31    }
32}
33
34depends_build-append port:pkgconfig
35
36depends_lib         port:libevent \
37                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
38                    port:gmime \
39                    port:lua \
40                    port:pcre \
41                    port:perl5 \
42                    port:hiredis
43
44set rspamd_user     _rspamd
45set rspamd_group    ${rspamd_user}
46add_users ${rspamd_user} group=${rspamd_group} realname=Rspamd
47
48configure.args-delete \
49                    -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib
50configure.args-append \
51                    -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/${name} \
52                    -DRSPAMD_USER=${rspamd_user} \
53                    -DBUILD_PORT:BOOL=ON \
54                    -DENABLE_LUAJIT:BOOL=OFF \
55                    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
56                    -DNO_SHARED=ON
57
58test.run            yes
59test.target         run-test
60post-destroot {
61
62    set docdir ${prefix}/share/doc/${name}
63    xinstall -d ${destroot}${docdir}
64    xinstall -m 0444 -W ${worksrcpath} ChangeLog LICENSE README.md ${destroot}${docdir}
65}
66
67post-activate {
68
69    set confdir ${prefix}/etc/${name}
70    foreach s [glob ${confdir}/*.sample] {
71   
72        if {![file exists [string map {.sample {}} "${s}"]]} {
73       
74            file copy ${s} [string map {.sample {}} "${s}"]
75        }
76    }
77}
78
79startupitem.create  yes
80startupitem.executable \
81                    ${prefix}/bin/rspamd \
82                    -u ${rspamd_user} \
83                    -g ${rspamd_group} \
84                    -f \
85                    -c ${prefix}/etc/rspamd/rspamd.conf
Note: See TracBrowser for help on using the repository browser.