docx to text converter.
This commit is contained in:
parent
2a8dbccbc8
commit
37aac3ccfa
5 changed files with 85 additions and 0 deletions
8
converters/docx2txt/DESCR
Normal file
8
converters/docx2txt/DESCR
Normal file
|
@ -0,0 +1,8 @@
|
|||
docx2txt (http://docx2txt.sourceforge.net/) is a simple tool to
|
||||
generate equivalent text files from Microsoft .docx documents, with
|
||||
an attempt towards preserving sufficient formatting and document
|
||||
information, and appropriate character conversions for a good text
|
||||
experience.
|
||||
|
||||
PKGSRC NOTE: contrary to the original package, pkgsrc only installs the
|
||||
perl script, and without the suffix .pl
|
54
converters/docx2txt/Makefile
Normal file
54
converters/docx2txt/Makefile
Normal file
|
@ -0,0 +1,54 @@
|
|||
# $NetBSD: Makefile,v 1.1 2013/01/05 20:36:58 is Exp $
|
||||
#
|
||||
|
||||
DISTNAME= docx2txt-1.2
|
||||
PKGREVISION= 1
|
||||
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"
|
4
converters/docx2txt/PLIST
Normal file
4
converters/docx2txt/PLIST
Normal file
|
@ -0,0 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2013/01/05 20:36:58 is Exp $
|
||||
bin/docx2txt
|
||||
share/doc/docx2txt/README
|
||||
share/doc/docx2txt/docx2txt.config
|
6
converters/docx2txt/distinfo
Normal file
6
converters/docx2txt/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.1 2013/01/05 20:36:58 is Exp $
|
||||
|
||||
SHA1 (docx2txt-1.2.tgz) = 3e1ed8a63f0c6ec05009720b7109f23cb7afe55c
|
||||
RMD160 (docx2txt-1.2.tgz) = 47f551dc8671582999262b8c858a26a34d82eddf
|
||||
Size (docx2txt-1.2.tgz) = 28483 bytes
|
||||
SHA1 (patch-docx2txt.pl) = fa216040d67613cceffce40fdaedd36bf114139e
|
13
converters/docx2txt/patches/patch-docx2txt.pl
Normal file
13
converters/docx2txt/patches/patch-docx2txt.pl
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-docx2txt.pl,v 1.1 2013/01/05 20:36:58 is Exp $
|
||||
|
||||
--- docx2txt.pl.orig 2012-01-14 12:09:40.000000000 +0000
|
||||
+++ docx2txt.pl
|
||||
@@ -129,7 +129,7 @@ if ($ENV{OS} =~ /^Windows/ && !(exists $
|
||||
$userConfigDir = $ENV{HOME};
|
||||
$systemConfigDir = "/etc";
|
||||
|
||||
- $config_tempDir = "/tmp";
|
||||
+ $config_tempDir = $ENV{TMPDIR} || "/tmp";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue