# NetBSD pkgsrc skeleton for OpenWebSpider.
#
# Normal NetBSD flow:
# 1. users install binary packages from pkgsrc repositories;
# 2. pkgsrc builds from this recipe when a source package is needed.

DISTNAME=	openwebspider-0.8
CATEGORIES=	www
MASTER_SITES=	# fill with release tarball URL

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.openwebspider.org/
COMMENT=	Small C web crawler and search indexer
LICENSE=	gnu-gpl-v2

USE_TOOLS+=	gmake pkg-config
USE_LANGUAGES=	c

MAKE_FLAGS+=	UNAME_S=NetBSD
MAKE_FLAGS+=	PREFIX=${PREFIX}
MAKE_FLAGS+=	LOCALBASE=${PREFIX}
MAKE_FLAGS+=	SYSCONFDIR=${PREFIX}/share/examples/openwebspider
MAKE_FLAGS+=	CONFIG_CFLAGS=-DOWS_SYSCONFDIR=\\\"${PKG_SYSCONFDIR}\\\"

INSTALL_TARGET=	install

CONF_FILES+=	${PREFIX}/share/examples/openwebspider/openwebspider.conf.sample ${PKG_SYSCONFDIR}/openwebspider.conf
CONF_FILES+=	${PREFIX}/share/examples/openwebspider/mod_pdf.conf.sample ${PKG_SYSCONFDIR}/mod_pdf.conf
CONF_FILES+=	${PREFIX}/share/examples/openwebspider/mod_image.conf.sample ${PKG_SYSCONFDIR}/mod_image.conf
CONF_FILES+=	${PREFIX}/share/examples/openwebspider/mod_video.conf.sample ${PKG_SYSCONFDIR}/mod_video.conf
CONF_FILES+=	${PREFIX}/share/examples/openwebspider/rank_weights.conf.sample ${PKG_SYSCONFDIR}/rank_weights.conf

INSTALLATION_DIRS+=	bin lib/openwebspider share/examples/openwebspider

.include "../../databases/mariadb-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
