Tweak irc/thales version 1.0_2
[dports.git] / irc / thales / Makefile
1 # Created by: Gerrit Beine <tux@pinguru.net>
2 # $FreeBSD: irc/thales/Makefile 335950 2013-12-09 02:43:37Z adamw $
3
4 PORTNAME=       thales
5 PORTVERSION=    1.0
6 PORTREVISION=   2
7 CATEGORIES=     irc
8 MASTER_SITES=   ${MASTER_SITE_GNU}
9 MASTER_SITE_SUBDIR=     ${PORTNAME}
10
11 MAINTAINER=     ports@FreeBSD.org
12 COMMENT=        GNU Thales -- An IRC to MySQL gateway
13
14 GNU_CONFIGURE=  yes
15 USE_GMAKE=      yes
16 USE_MYSQL=      yes
17 USE_RC_SUBR=    thales
18
19 OPTIONS_DEFINE= MODES
20 OPTIONS_RADIO=  IRCD
21 OPTIONS_RADIO_IRCD=     HYBRID IRCDRU UNREAL
22 OPTIONS_DEFAULT=MODES UNREAL
23 MODES_DESC=             Support modes in the database
24 HYBRID_DESC=    Build for ircd-hybrid
25 IRCDRU_DESC=    Build for ircd-ru
26 UNREAL_DESC=    Build for unreal ircd
27
28 HYBRID_RUN_DEPENDS=     ${LOCALBASE}/bin/ircd:${PORTSDIR}/irc/ircd-hybrid
29 IRCDRU_RUN_DEPENDS=     ${LOCALBASE}/sbin/ircd:${PORTSDIR}/irc/ircd-ru
30 UNREAL_RUN_DEPENDS=     ${LOCALBASE}/libexec/ircd:${PORTSDIR}/irc/unreal
31
32 # Currently, not all supported IRCDs are handled here, only the ones
33 # I could find corresponding RUN_DEPENDS in our Ports Collection.
34 .include <bsd.port.options.mk>
35 .if ${PORT_OPTIONS:MHYBRID}
36 _IRCD=  hybrid
37 IS_INTERACTIVE= yes
38 .elif ${PORT_OPTIONS:MIRCDRU}
39 _IRCD=  ircdru
40 IS_INTERACTIVE= yes
41 .else
42 _IRCD=  unreal
43 .endif
44
45 # ``Assign with expansion'' is needed here, otherwise we cannot override
46 # WITH_IRCD value supplied as make(1) argument (which can be bogus).
47 CONFIGURE_ARGS:=        --with-ircd=${_IRCD} \
48                         --prefix=${PREFIX}/sbin/thales \
49                         --with-mysql=${LOCALBASE} \
50                         --with-mysql-libraries=${LOCALBASE}/lib/mysql
51
52 MODES_CONFIGURE_OFF=    --enable-no-modes
53
54 post-patch: .SILENT
55         ${FIND} -d ${WRKSRC} -type d -name CVS -exec ${RM} -rf {} \;
56         ${REINPLACE_CMD} -e 's,thales.conf,${PREFIX}/etc/&,' \
57                 ${WRKSRC}/src/conf.h
58
59 do-install:
60         @${MKDIR} ${STAGEDIR}${DATADIR}
61         ${INSTALL_PROGRAM} ${WRKSRC}/src/thales ${STAGEDIR}${PREFIX}/sbin
62         ${INSTALL_DATA} ${WRKSRC}/data/thales.conf.default ${STAGEDIR}${PREFIX}/etc
63         ${INSTALL_DATA} ${WRKSRC}/data/*.sql ${STAGEDIR}${DATADIR}
64         @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${STAGEDIR}${DATADIR}/tools
65         ${CP} -r ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}
66         ${CP} -r ${WRKSRC}/tools/* ${STAGEDIR}${DATADIR}/tools
67
68 .include <bsd.port.mk>