summaryrefslogtreecommitdiff
path: root/community/antiword
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/antiword
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/antiword')
-rw-r--r--community/antiword/PKGBUILD26
-rw-r--r--community/antiword/antiword-helper13
-rw-r--r--community/antiword/antiword.install26
3 files changed, 65 insertions, 0 deletions
diff --git a/community/antiword/PKGBUILD b/community/antiword/PKGBUILD
new file mode 100644
index 000000000..9103de17c
--- /dev/null
+++ b/community/antiword/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer : Aaron, phrakture, Griffin <aaron@archlinux.org>
+# Contributor: Gustav Munkby <grddev@gmx.net>
+
+pkgname=antiword
+pkgver=0.37
+pkgrel=2
+pkgdesc="Antiword is a free MS Word reader for Linux and RISC OS"
+arch=('i686' 'x86_64')
+url="http://www.winfield.demon.nl/"
+license="GPL"
+depends=('glibc')
+install=antiword.install
+source=(http://www.winfield.demon.nl/linux/$pkgname-$pkgver.tar.gz \
+ antiword-helper)
+md5sums=('f868e2a269edcbc06bf77e89a55898d1' '01a988376cfd4bb268120ab597c9abe3')
+
+build()
+{
+ cd $srcdir/$pkgname-$pkgver
+ sed -i "s|CFLAGS =.*|CFLAGS = $CFLAGS -DNDEBUG|g; \
+ s|GLOBAL_INSTALL_DIR =.*|GLOBAL_INSTALL_DIR = /usr/bin|g" \
+ Makefile.Linux
+ make DESTDIR=$pkgdir global_install
+ install -m755 $srcdir/antiword-helper $pkgdir/usr/bin/
+ install -Dm644 Docs/antiword.1 $pkgdir/usr/share/man/man1/antiword.1
+}
diff --git a/community/antiword/antiword-helper b/community/antiword/antiword-helper
new file mode 100644
index 000000000..ee9fea627
--- /dev/null
+++ b/community/antiword/antiword-helper
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+[ $# -eq 2 ] || exit 1
+
+tmpfile=/tmp/aw$$.txt
+editor=${EDITOR:-`which vi`}
+terminal="$2"
+
+antiword "$1" > $tmpfile
+chmod -w $tmpfile
+$terminal -e $editor $tmpfile
+chmod +w $tmpfile
+rm $tmpfile
diff --git a/community/antiword/antiword.install b/community/antiword/antiword.install
new file mode 100644
index 000000000..58aaccde7
--- /dev/null
+++ b/community/antiword/antiword.install
@@ -0,0 +1,26 @@
+post_install()
+{
+ cat << EOF
+NOTES On Antiword Integration:
+
+* If you use mozplugger, make sure to configure the
+ msword section like so (replacing <TERMINAL> with your
+ terminal of choice):
+ application/msword: doc, dot: Microsoft Word Document
+ ignore_errors exits: antiword-helper <TERMINAL> "$file"
+
+* To properly use antiword in your mailcap settings:
+ application/msword; antiword %s; copiousoutput
+
+* To enable drag-and-drop support in KDE, use the kantiword script
+EOF
+}
+
+post_upgrade()
+{
+ post_install $1
+}
+
+op=$1
+shift
+$op $*