summaryrefslogtreecommitdiff
path: root/misc/libmcal/Makefile
blob: 0e02d634d1d43fa297f2eaf493b6c19f90184cba (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
# New ports collection makefile for:	libmcal
# Date created:		Sat Oct 13 08:45:04 GMT 2001
# Whom:			thierry@thomas.as
#
# $FreeBSD$
#

PORTNAME=	libmcal
PORTVERSION=	0.6
PORTREVISION=	2
CATEGORIES=	misc
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} mcaldrivers-0.8.tar.gz

MAINTAINER=	thierry@pompo.net

LIB_DEPENDS=	ltdl.1:${PORTSDIR}/devel/libtool

HAS_CONFIGURE=	yes
USE_LIBTOOL=	yes
USE_GMAKE=	yes
CONFIGURE_ARGS=	--with-mstore --with-icap \
		--prefix=${PREFIX} --exec-prefix=${PREFIX}
INSTALLS_SHLIB=	yes

WRKSRC=		${WRKDIR}/${PORTNAME}
WRKSRCDRV=	${WRKDIR}/mcal-drivers

DOCS=		CHANGELOG FAQ-MCAL FEATURE-IMPLEMENTATION FUNCTION-REF.html \
		HOW-TO-MCAL LICENSE README mstore/README.mstore

post-extract:
	${CP} -pR ${WRKSRCDRV}/mstore ${WRKSRC}
	${CP} -pR ${WRKSRCDRV}/icap ${WRKSRC}
	${MV} ${WRKSRC}/mstore/Makefile ${WRKSRC}/mstore/Makefile.dist
	${MV} ${WRKSRC}/mstore/Makefile.FreeBSD ${WRKSRC}/mstore/Makefile
	${MV} ${WRKSRC}/icap/Makefile ${WRKSRC}/icap/Makefile.dist
	${MV} ${WRKSRC}/icap/Makefile.FreeBSD ${WRKSRC}/icap/Makefile
	${MV} ${WRKSRC}/configure ${WRKSRC}/configure.dist
	${MV} ${WRKSRC}/configure.FreeBSD ${WRKSRC}/configure
	${CHMOD} u+x ${WRKSRC}/configure
	${MV} ${WRKSRC}/mstore/README ${WRKSRC}/mstore/README.mstore

post-patch:
	${PERL} -pi -e "s:/etc/mpasswd:${PREFIX}/etc/mpasswd:" ${WRKSRC}/mstore/mstore.c

pre-configure:
	@${ECHO_MSG} "===>  Building the driver mstore"
	cd ${WRKSRC}/mstore ; \
		${MAKE}
	@${ECHO_MSG} "===>  Building the driver icap"
	cd ${WRKSRC}/icap ; \
		${MAKE}

post-install:
.if !defined(NOPORTDOCS)
	${PERL} -pi -e "s:/etc/mpasswd:${LOCALBASE}/etc/mpasswd:" ${WRKSRC}/FAQ-MCAL
	${PERL} -pi -e "s:/etc/mpasswd:${LOCALBASE}/etc/mpasswd:" ${WRKSRC}/mstore/README.mstore
	${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
	@${ECHO_MSG} "===>  Documentation installed in ${DOCSDIR}."
.endif
	@${ECHO}
	@${CAT} ${PKGMESSAGE} | ${SED} -e "s:%%LOCALBASE%%:${LOCALBASE}:g"
	@${ECHO}

.include <bsd.port.mk>