Import irc/thales version 1.0_2
[dports.git] / irc / thales / Makefile
1 # Ports collection makefile for:        GNU Thales
2 # Date created:                         30 May 2004
3 # Whom:                                 Gerrit Beine <tux@pinguru.net>
4 #
5 # $FreeBSD: ports/irc/thales/Makefile,v 1.10 2012/11/17 05:58:30 svnexp Exp $
6 #
7
8 PORTNAME=       thales
9 PORTVERSION=    1.0
10 PORTREVISION=   2
11 CATEGORIES=     irc
12 MASTER_SITES=   ${MASTER_SITE_GNU}
13 MASTER_SITE_SUBDIR=     ${PORTNAME}
14
15 MAINTAINER=     ports@FreeBSD.org
16 COMMENT=        GNU Thales -- An IRC to MySQL gateway
17
18 GNU_CONFIGURE=  yes
19 USE_GMAKE=      yes
20 USE_MYSQL=      yes
21 USE_RC_SUBR=    thales
22
23 # Currently, not all supported IRCDs are handled here, only the ones
24 # I could find corresponding RUN_DEPENDS in our Ports Collection.
25 .if defined(WITH_IRCD) && ${WITH_IRCD} == hybrid
26 RUN_DEPENDS=    ${LOCALBASE}/bin/ircd:${PORTSDIR}/irc/ircd-hybrid
27 IS_INTERACTIVE= yes
28 .elif defined(WITH_IRCD) && ${WITH_IRCD} == ircdru
29 RUN_DEPENDS=    ${LOCALBASE}/sbin/ircd:${PORTSDIR}/irc/ircd-ru
30 IS_INTERACTIVE= yes
31 .else
32 WITH_IRCD=      unreal
33 RUN_DEPENDS=    ${LOCALBASE}/libexec/ircd:${PORTSDIR}/irc/unreal
34 .endif
35
36 # ``Assign with expansion'' is needed here, otherwise we cannot override
37 # WITH_IRCD value supplied as make(1) argument (which can be bogus).
38 CONFIGURE_ARGS:=        --with-ircd=${WITH_IRCD} \
39                         --prefix=${PREFIX}/sbin/thales \
40                         --with-mysql=${LOCALBASE} \
41                         --with-mysql-libraries=${LOCALBASE}/lib/mysql
42
43 .if defined(WITHOUT_MODES)
44 CONFIGURE_ARGS+=        --enable-no-modes
45 .endif
46
47 pre-everything:: .SILENT
48         ${ECHO_CMD} ""
49         ${ECHO_CMD} "You may specify the IRCD which thales is compiled for"
50         ${ECHO_CMD} ""
51         ${ECHO_CMD} "   WITH_IRCD=foo"
52         ${ECHO_CMD} ""
53         ${ECHO_CMD} "The default value is \"unreal\".  Other possible values are:"
54         ${ECHO_CMD} "  bahamut, hybrid, ircdru, unreal, ultimate28, ultimate30"
55         ${ECHO_CMD} ""
56         ${ECHO_CMD} "Additinal tunables:"
57         ${ECHO_CMD} ""
58         ${ECHO_CMD} "   WITHOUT_MODES   Disable modes in the database (default: on)"
59         ${ECHO_CMD} ""
60
61 post-patch: .SILENT
62         ${FIND} -d ${WRKSRC} -type d -name CVS -exec ${RM} -rf {} \;
63         ${REINPLACE_CMD} -e 's,thales.conf,${PREFIX}/etc/&,' \
64                 ${WRKSRC}/src/conf.h
65
66 do-install:
67         @${MKDIR} ${DATADIR}
68         ${INSTALL_PROGRAM} ${WRKSRC}/src/thales ${PREFIX}/sbin
69         ${INSTALL_DATA} ${WRKSRC}/data/thales.conf.default ${PREFIX}/etc
70         ${INSTALL_DATA} ${WRKSRC}/data/*.sql ${DATADIR}
71 .if !defined(NOPORTDOCS)
72         @${MKDIR} ${EXAMPLESDIR} ${DATADIR}/tools
73         ${CP} -r ${WRKSRC}/examples/* ${EXAMPLESDIR}
74         ${CP} -r ${WRKSRC}/tools/* ${DATADIR}/tools
75 .endif
76
77 .include <bsd.port.mk>