summaryrefslogtreecommitdiff
path: root/databases/sqlite-ext-miscfuncs/Makefile
blob: 2e00c02a0d29cf64a7c5ef97c41bc1aa611fe8b7 (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
# New ports collection makefile for:	sqlite-ext-miscfuncs
# Date created:		28 Jan 2010
# Whom:			Greg Larkin <glarkin@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	sqlite-ext-miscfuncs
PORTVERSION=	1.0
CATEGORIES=	databases
MASTER_SITES=	LOCAL/glarkin
DISTNAME=	${SRCFILE}
EXTRACT_SUFX=

MAINTAINER=	glarkin@FreeBSD.org
COMMENT=	Math, string, and aggregate function library for SQLite

USE_SQLITE=	yes
DIST_SUBDIR=	sqlite-ext
NO_WRKSUBDIR=	yes

SRCFILE=	extension-functions.c
LIBFILE=	libsqlitemiscfuncs.so
INST_DIR=	${PREFIX}/libexec/${DIST_SUBDIR}
USE_LDCONFIG=	${INST_DIR}

SUB_FILES=	${PORTDOCS}
SUB_LIST+=	LIBFILE=${LIBFILE}

EXTRACT_CMD=	${CP}
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS=	${WRKSRC}/

PLIST_DIRS=	libexec/${DIST_SUBDIR}
PLIST_FILES=	${PLIST_DIRS}/${LIBFILE}

PORTDOCS=	README

CFLAGS+=	-I${PREFIX}/include -fPIC -lm -shared

do-build:
	@cd ${WRKSRC} && ${CC} ${CFLAGS} ${SRCFILE} -o ${LIBFILE}

do-install:
	@${INSTALL} -d ${PREFIX}/libexec/${DIST_SUBDIR}
	@${INSTALL_PROGRAM} ${WRKSRC}/${LIBFILE} ${INST_DIR}

post-install:
.if !defined(NOPORTDOCS)
	@${INSTALL} -d ${DOCSDIR}
	@${CP} ${WRKDIR}/${PORTDOCS} ${DOCSDIR}
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>