summaryrefslogtreecommitdiff
path: root/converters/docx2txt/Makefile
blob: da8b21b2f47a944b48820c7e294f64ab17b1f9ff (plain)
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
# $NetBSD: Makefile,v 1.3 2014/05/29 23:35:21 wiz Exp $
#

DISTNAME=	docx2txt-1.2
PKGREVISION=	3
CATEGORIES=	converters
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=docx2txt/}
EXTRACT_SUFX=	.tgz

MAINTAINER=	is@NetBSD.org
HOMEPAGE=	http://docx2txt.sourceforge.net/
COMMENT=	Convert Microsoft .docx documents to simple text files
LICENSE=	gnu-gpl-v3

USE_LANGUAGES=	# none
USE_TOOLS+=     perl:run unzip:run
REPLACE_PERL=   docx2txt.pl

BINDIR=		${PREFIX}/bin
EGDIR=		${PREFIX}/share/doc/docx2txt
CONF_FILES=	${EGDIR}/docx2txt.config ${PKG_SYSCONFDIR}/docx2txt.config

SUBST_CLASSES+=		fix-etc
SUBST_STAGE.fix-etc=	pre-configure
SUBST_MESSAGE.fix-etc=	Fixing /etc path.
SUBST_FILES.fix-etc=	*.pl README
SUBST_SED.fix-etc=	-e 's,"/etc,"${PKG_SYSCONFDIR},g'
SUBST_SED.fix-etc+=	-e 's, /etc , ${PKG_SYSCONFDIR} ,g'

SUBST_CLASSES+=         unzip
SUBST_STAGE.unzip=      pre-configure
SUBST_MESSAGE.unzip=    Hardcoding unzip path
SUBST_FILES.unzip=      *.pl *.config
SUBST_SED.unzip=        -e 's,/usr/bin/unzip,${TOOLS_PATH.unzip},'

SUBST_CLASSES+=		suffix
SUBST_STAGE.suffix=	pre-configure
SUBST_MESSAGE.suffix=	removing .pl suffix
SUBST_FILES.suffix=	README
SUBST_SED.suffix=	-e 's,docx2txt.pl,docx2txt,'



do-build:
	mv ${WRKSRC}/docx2txt.pl ${WRKSRC}/docx2txt

do-install:
	${INSTALL_PROGRAM_DIR}				${DESTDIR}${BINDIR}
	${INSTALL_SCRIPT} ${WRKSRC}/docx2txt		${DESTDIR}${BINDIR}
	${INSTALL_DATA_DIR}				${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/docx2txt.config	${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/README		${DESTDIR}${EGDIR}

.include "../../mk/bsd.pkg.mk"