summaryrefslogtreecommitdiffstats
path: root/irc/xchat-mircryption/Makefile
blob: 0bcc05fa3fbfc4b45706f532021c2e0e4d790e84 (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
# New ports collection makefile for:    XChat encryption
# Date created:     Sat Jan  8 21:48:41 UTC 2005
# Whom:                 Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#    $MCom: ports/irc/xchat-mircryption/Makefile,v 1.1 2006/10/04 22:27:49 ahze Exp $
#

PORTNAME=   mircryption
DISTVERSION=    1.1.27
PORTREVISION=   1
CATEGORIES= irc security
MASTER_SITES=   http://mircryption.sourceforge.net/Downloads/
PKGNAMEPREFIX=  xchat-
DISTNAME=   mircryption_xchatsrc

MAINTAINER= ports@FreeBSD.org
COMMENT=    A free encryption add-on for the popular XChat irc client

RUN_DEPENDS=    xchat:${PORTSDIR}/irc/xchat

USE_ZIP=    yes
ALL_TARGET= freebsd
CFLAGS+=    -fPIC
USE_LDCONFIG=   yes

WRKSRC=     ${WRKDIR}/mircryption/src/xchat/
#
DOCSDIR=    ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR=    ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}

PLIST_DIRS= \
        %%EXAMPLESDIR%%
PLIST_FILES=    \
        lib/xchat/plugins/mircryption.so \
        %%EXAMPLESDIR%%/mcps_masterkey_on_start.pl

PORTDOCS=   \
        README.txt

post-patch:
# \r\n -> \n
    @${FIND} ${WRKSRC} -type f -exec \
        ${REINPLACE_CMD} -E \
        -e 's|
||' \
        {} \;
# CFLAGS safeness
# LDFLAGS safeness
# linker safeness
    @${REINPLACE_CMD} -E \
        -e 's|^(CFLAGS.+)"$$|\1 ${CFLAGS}"|' \
        -e 's|^(LDFLAGS.+)"$$|\1 ${LDFLAGS}"|' \
        -e 's|^(LOAD).*$$|LOAD=${CXX}|' \
        ${WRKSRC}/${MAKEFILE}
# set perl path if it exists
.ifdef(PERL5)
    @${REINPLACE_CMD} -E \
        -e 's|/usr/bin/perl|${PERL5}|' \
        ${WRKSRC}/extras/mcps_masterkey_on_start.pl
.endif

do-install:
# docs
.ifndef(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/README.txt \
        ${DOCSDIR}
.endif
# plugin
    @${MKDIR} ${PREFIX}/lib/xchat/plugins
    @${INSTALL_PROGRAM} ${WRKSRC}/mircryption.so \
        ${PREFIX}/lib/xchat/plugins
# script
    @${MKDIR} ${EXAMPLESDIR}
    @${INSTALL_SCRIPT} \
        ${WRKSRC}/extras/mcps_masterkey_on_start.pl \
        ${EXAMPLESDIR}

.include <bsd.port.mk>