PORTNAME=	o3read
PORTVERSION=	0.0.4
PORTREVISION=	2
CATEGORIES=	converters
MASTER_SITES=	https://siag.nu/pub/o3read/

MAINTAINER=	samm@FreeBSD.org
COMMENT=	Standalone converter for the OpenOffice.org writer and scalc formats
WWW=		https://siag.nu/o3read/

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

FETCH_BEFORE_ARGS=	--user-agent=Wget/1.20.3

PORTDOCS=	README ChangeLog

OPTIONS_DEFINE=	DOCS

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/o3read ${STAGEDIR}${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/o3totxt ${STAGEDIR}${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/o3tohtml ${STAGEDIR}${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/utf8tolatin1 ${STAGEDIR}${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${PREFIX}/share/man/man1

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for FILE in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>
