aboutsummaryrefslogtreecommitdiffstats
path: root/security/p5-openxpki/Makefile
blob: 8ba60e434cd4dcad118bec2fd161c99312d0abe8 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Created by: Sergei Vyshenski <svysh.fbsd@gmail.com>
# $FreeBSD$

PORTNAME=   openxpki
PORTVERSION=    0.27.0.1
CATEGORIES= security perl5
PKGNAMEPREFIX=  p5-

MAINTAINER= svysh.fbsd@gmail.com
COMMENT=    Perl based trustcenter for PKI: universal server building block

LICENSE=    APACHE20

BUILD_DEPENDS=  \
    p5-Math-BigInt>=1.9993:${PORTSDIR}/math/p5-Math-BigInt \
    p5-Test-Prereq>=0:${PORTSDIR}/devel/p5-Test-Prereq \
    p5-Config-GitLike>=0:${PORTSDIR}/devel/p5-Config-GitLike \
    p5-openxpki-i18n>=0.20.0.1:${PORTSDIR}/security/p5-openxpki-i18n \
    openca-tools-forked>=1.4.0:${PORTSDIR}/security/openca-tools-forked \
    p5-Class-Accessor-Chained>=0:${PORTSDIR}/devel/p5-Class-Accessor-Chained \
    p5-Config-Merge>=0:${PORTSDIR}/devel/p5-Config-Merge \
    p5-Connector>=0:${PORTSDIR}/devel/p5-Connector \
    p5-JSON>=0:${PORTSDIR}/converters/p5-JSON \
    p5-Crypt-OpenSSL-AES>=0:${PORTSDIR}/security/p5-Crypt-OpenSSL-AES \
    p5-JSON>=0:${PORTSDIR}/converters/p5-JSON \
    p5-LWP-Protocol-connect>=0:${PORTSDIR}/www/p5-LWP-Protocol-connect \
    p5-LWP-Protocol-https>=0:${PORTSDIR}/www/p5-LWP-Protocol-https \
    p5-Moose>=0:${PORTSDIR}/devel/p5-Moose \
    p5-Crypt-SSLeay>=0:${PORTSDIR}/security/p5-Crypt-SSLeay \
    p5-Path-Class>=0:${PORTSDIR}/devel/p5-Path-Class \
    p5-Proc-SafeExec>=0:${PORTSDIR}/devel/p5-Proc-SafeExec \
    p5-SOAP-Lite>=0:${PORTSDIR}/net/p5-SOAP-Lite \
    p5-Switch>=0:${PORTSDIR}/lang/p5-Switch \
    p5-Workflow>=0.31:${PORTSDIR}/devel/p5-Workflow \
    p5-CGI-Session>=0:${PORTSDIR}/www/p5-CGI-Session \
    p5-TimeDate>=0:${PORTSDIR}/devel/p5-TimeDate \
    p5-Locale-libintl>=0:${PORTSDIR}/devel/p5-Locale-libintl \
    p5-perl-ldap>=0:${PORTSDIR}/net/p5-perl-ldap \
    p5-Regexp-Common>=0:${PORTSDIR}/textproc/p5-Regexp-Common \
    p5-Text-CSV_XS>=0:${PORTSDIR}/textproc/p5-Text-CSV_XS \
    p5-XML-Filter-XInclude>=0:${PORTSDIR}/textproc/p5-XML-Filter-XInclude \
    p5-XML-SAX-Writer>=0:${PORTSDIR}/textproc/p5-XML-SAX-Writer \
    p5-XML-Validator-Schema>=0:${PORTSDIR}/textproc/p5-XML-Validator-Schema \
    p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
    p5-Test-Pod>=0:${PORTSDIR}/devel/p5-Test-Pod \
    p5-Test-Pod-Coverage>=0:${PORTSDIR}/devel/p5-Test-Pod-Coverage \
    p5-Net-IP>=0:${PORTSDIR}/net-mgmt/p5-Net-IP \
    p5-Class-Std>=0:${PORTSDIR}/devel/p5-Class-Std \
    p5-Mail-RFC822-Address>=0:${PORTSDIR}/mail/p5-Mail-RFC822-Address \
    p5-Proc-ProcessTable>=0:${PORTSDIR}/devel/p5-Proc-ProcessTable \
    p5-Sys-SigAction>=0:${PORTSDIR}/devel/p5-Sys-SigAction \
    p5-Data-Password>=0:${PORTSDIR}/security/p5-Data-Password \
    p5-RT-Client-REST>=0:${PORTSDIR}/www/p5-RT-Client-REST \
    p5-Data-Serializer>=0:${PORTSDIR}/devel/p5-Data-Serializer \
    p5-IPC-ShareLite>=0:${PORTSDIR}/devel/p5-IPC-ShareLite \
    p5-DateTime-Format-DateParse>=0:${PORTSDIR}/devel/p5-DateTime-Format-DateParse \
    p5-IO-Prompt>=0:${PORTSDIR}/devel/p5-IO-Prompt \
    p5-Config-Std>=0:${PORTSDIR}/devel/p5-Config-Std \
    p5-Template-Toolkit>=0:${PORTSDIR}/www/p5-Template-Toolkit \
    p5-NetAddr-IP>=0:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \
    p5-DBD-Mock>=0:${PORTSDIR}/databases/p5-DBD-Mock \
    p5-Crypt-CBC>=0:${PORTSDIR}/security/p5-Crypt-CBC \
    bash:${PORTSDIR}/shells/bash \

RUN_DEPENDS:=   ${BUILD_DEPENDS}

CONFLICTS=  \
    p5-openxpki-client-[0-9]* \
    p5-openxpki-client-scep-[0-9]* \
    p5-openxpki-client-deployment-[0-9]* \
    p5-openxpki-client-html-mason-[0-9]*

USE_GITHUB= yes
GH_TAGNAME= 5a4c5eb

USE_OPENSSL=    yes
USE_PERL5=  configure
USES=       gmake perl5
USE_RC_SUBR=    openxpki
SUB_FILES=  pkg-message
PORTDOCS=   *

WRKSRC_SUBDIR=  core/server

USERS=  openxpki
GROUPS= openxpki

OPTIONS_DEFINE= GRAPHVIZ DOCS

GRAPHVIZ_DESC=  With graphical visualization of workflows?
GRAPHVIZ_RUN_DEPENDS=   ${LOCALBASE}/bin/dot:${PORTSDIR}/graphics/graphviz \
            ${LOCALBASE}/bin/imgsize:${PORTSDIR}/graphics/p5-Image-Size

post-patch:
    @${REINPLACE_CMD} -e 's|..vergen --format version.|"${PORTVERSION:R}"|g' ${WRKSRC}/Makefile.PL
    @${RM} -f ${WRKSRC}/Makefile.PL.bak
    @( \
    cd ${WRKSRC}/../..; \
    ${FIND} config core/server doc qatest tools -type f -print0 >filelist; \
    ${CAT} filelist | ${XARGS} -0 -I % ${REINPLACE_CMD} -e 's|/etc/openxpki|${PREFIX}/etc/openxpki|g' "%"; \
    ${CAT} filelist | ${XARGS} -0 -I % ${REINPLACE_CMD} -e 's|/var/run/openxpkid.pid|/var/openxpki/openxpkid.pid|g' "%"; \
    ${CAT} filelist | ${XARGS} -0 -I % ${REINPLACE_CMD} -e 's|/var/openxpki/\([^\.]*\)\.log|/var/log/openxpki/\1\.log|g' "%"; \
    ${CAT} filelist | ${XARGS} -0 -I % ${RM} -f "%.bak"; \
    ${RM} filelist; \
    )
    @${MKDIR} ${WRKSRC}/t/var/log/openxpki

post-stage:
    @${MKDIR} ${STAGEDIR}/var/openxpki
    @${MKDIR} ${STAGEDIR}/var/openxpki/session
    @${MKDIR} ${STAGEDIR}/var/log/openxpki
    @${MKDIR} ${STAGEDIR}${PREFIX}/etc/openxpki

#pre-install:   test

.include <bsd.port.pre.mk>

post-install:
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/OpenXPKI/OpenXPKI.so
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    @(cd ${WRKSRC}/../../config && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.   if ${PORT_OPTIONS:MDOCS}
        @${MKDIR} ${STAGEDIR}${DOCSDIR}
        @(cd ${WRKSRC}/../../doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.   endif
.include <bsd.port.post.mk>