aboutsummaryrefslogtreecommitdiffstats
path: root/mail/pysieved/Makefile
blob: 56abd95f187c9f3de2cd06c037d3abb4a35f87bf (plain) (blame)
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
# Created by: Denis Shaposhnikov <dsh@wizard.volgograd.ru>
# $FreeBSD$

PORTNAME=   pysieved
PORTVERSION=    1.0
PORTREVISION=   1
PORTEPOCH=  1
CATEGORIES= mail python
MASTER_SITES=   http://ports.internal.vlink.ru/distfiles/

MAINTAINER= dsh@wizard.volgograd.ru
COMMENT=    Python Managesieve Server

USES=   tar:bzip2
USE_PYTHON= yes
USE_RC_SUBR=    ${PORTNAME}

PORTEXAMPLES=   pysieved.xinetd
SUB_LIST=   PORTNAME=${PORTNAME} PYTHON_CMD=${PYTHON_CMD}

PORTDOCS=   COPYING README README.Dovecot THANKS

post-patch:
    ${REINPLACE_CMD} \
        's!/usr/bin/env python!${PYTHON_CMD}!' \
        ${WRKSRC}/pysieved.py

do-build:
    ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
        -d ${PREFIX}/lib/${PORTNAME} ${WRKSRC}

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
    (cd ${WRKSRC} && \
        ${COPYTREE_SHARE} "*.py *.pyc plugins" ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
    ${CHMOD} ${BINMODE} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${PORTNAME}.py
    ${INSTALL_DATA} ${WRKSRC}/pysieved.ini \
        ${STAGEDIR}${PREFIX}/etc/pysieved.ini.sample

    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    (cd ${WRKSRC}/contrib && \
        ${COPYTREE_SHARE} "${PORTEXAMPLES}" ${STAGEDIR}${EXAMPLESDIR})

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>