aboutsummaryrefslogtreecommitdiff
path: root/net/radiator/Makefile
blob: 876bfd24a8dd5601188dd763aad7ace43d3f08f8 (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
# Created by: shan
# $FreeBSD$

PORTNAME=	Radiator
PORTVERSION=	4.14
CATEGORIES=	net
MASTER_SITES=	# fetch manually
DIST_SUBDIR=	${PORTNAME}

MAINTAINER=	lyngbol@wheel.dk
COMMENT=	Radiator Radius Server by Open System Consultants

OPTIONS_DEFINE=	MYSQL
MYSQL_DESC=	MySQL support

USES=		perl5 tar:tgz
USE_PERL5=	configure
USE_RC_SUBR=	radiator

RESTRICTED=	Commercial software

.include <bsd.port.pre.mk>

.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTFILES})
IGNORE=		will not be automatically fetched due to licensing\
		restrictions.  You MUST manually fetch the UNIX version after\
		purchasing the license at: http://www.open.com.au/ \
		- once ${DISTFILES} has been downloaded, move it to\
		${DISTDIR}/${DIST_SUBDIR} and then restart this build. \
		(optionally download patches-${PORTVERSION}.tar.gz to the \
		same directory as well)
.endif

.if ${PORT_OPTIONS:MMYSQL}
RUN_DEPENDS+=	p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql
.endif

pre-configure:
.if exists(${DISTDIR}/${DIST_SUBDIR}/patches-${PORTVERSION}.tar.gz)
	${TAR} -xvzf ${DISTDIR}/${DIST_SUBDIR}/patches-${PORTVERSION}.tar.gz -C ${WRKSRC}
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/radius.cfg

post-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/radiator
	${INSTALL_DATA} ${WRKSRC}/radius.cfg ${STAGEDIR}${PREFIX}/etc/radiator/radius.cfg.sample
	${INSTALL_DATA} ${WRKSRC}/dictionary ${STAGEDIR}${PREFIX}/etc/radiator
	${INSTALL_DATA} ${WRKSRC}/dictionary.ascend ${STAGEDIR}${PREFIX}/etc/radiator
	${INSTALL_DATA} ${WRKSRC}/dictionary.cisco-vpn ${STAGEDIR}${PREFIX}/etc/radiator
	${INSTALL_DATA} ${WRKSRC}/dictionary.sip ${STAGEDIR}${PREFIX}/etc/radiator

.include <bsd.port.post.mk>