summaryrefslogtreecommitdiff
path: root/databases/sqlite-ext-miscfuncs/Makefile
blob: e2ccd6d762f449d3721a932126bf2bc1a55fb805 (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
# Created by: Greg Larkin <glarkin@FreeBSD.org>
# $FreeBSD$

PORTNAME=	sqlite-ext-miscfuncs
PORTVERSION=	1.1
CATEGORIES=	databases
MASTER_SITES=	http://www.sourcehosting.net/freebsd/distfiles/ \
		LOCAL/glarkin
DISTNAME=	${SRCFILE}
EXTRACT_SUFX=

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

USE_SQLITE=	yes
DIST_SUBDIR=	sqlite-ext
NO_WRKSUBDIR=	yes

SRCFILE=	extension-functions-${PORTVERSION}.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

OPTIONS_DEFINE=	DOCS

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

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

post-install:
	@${INSTALL} -d ${STAGEDIR}${DOCSDIR}
	@${CP} ${WRKDIR}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>