aboutsummaryrefslogtreecommitdiffstats
path: root/net/jabber-users-agent/Makefile
blob: a202ba420a7635a6b2f526e93bdf0c3894f56ce3 (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
# New ports collection makefile for:    jabber-users-agent
# Date created:     2005-06-07
# Whom:         Renato Botelho <freebsd@galle.com.br>
#
# $FreeBSD$
#

PORTNAME=   users-agent
PORTVERSION=    1.2
CATEGORIES= net
MASTER_SITES=   http://files.jabberstudio.org/users-agent/
PKGNAMEPREFIX=  jabber-
DISTNAME=   Users-Agent-${PORTVERSION}

MAINTAINER= garga@FreeBSD.org
COMMENT=    A Perl based Jabber User Directory

NO_BUILD=   yes
STRIP=
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
INST_DIR=   ${PREFIX}/lib/jabber/${PORTNAME}
PORTDOCS=   README INSTALL
USE_PERL5=  yes
USE_RC_SUBR=    jabber-users-agent.sh
SUB_LIST+=  PERL=${PERL}

BUILD_DEPENDS+= ${SITE_PERL}/Net/Jabber.pm:${PORTSDIR}/net/p5-Net-Jabber \
        ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql

.include <bsd.port.pre.mk>

post-patch:
    @${PERL} -pi -e 's|config.xml|${PREFIX}/etc/jabber-users-agent.xml|g' \
        ${WRKSRC}/users-agent
    @${PERL} -pi -e 's|%%PERL%%|${PERL}|g' ${WRKSRC}/users-agent

do-install:
    ${MKDIR} ${INST_DIR}
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/createDB ${INST_DIR}

.if !exists(${PREFIX}/etc/jabber-users-agent.xml)
    ${INSTALL_DATA} ${WRKSRC}/config.xml ${PREFIX}/etc/jabber-users-agent.xml
.endif
    ${INSTALL_DATA} ${WRKSRC}/config.xml ${PREFIX}/etc/jabber-users-agent.xml.sample

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S!^!${WRKSRC}/!} ${DOCSDIR}
.endif

.include <bsd.port.post.mk>