summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-17 07:54:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-17 09:47:05 +0000
commit0bc0559d6eca1981236fdab61dfed72fca61ac85 (patch)
treee6bfb45353de3f7c1d16558eebb48bba52003b27
parentd4898409df0b9ba0dd9de2a2a019c01d95d55268 (diff)
downloadaports-0bc0559d6eca1981236fdab61dfed72fca61ac85.tar.bz2
aports-0bc0559d6eca1981236fdab61dfed72fca61ac85.tar.xz
testing/txt2man: new aport
Convert flat ASCII text to man page format http://mvertes.free.fr/txt2man/
-rw-r--r--testing/txt2man/APKBUILD42
-rw-r--r--testing/txt2man/fixbashism.patch14
-rw-r--r--testing/txt2man/makefile.patch23
3 files changed, 79 insertions, 0 deletions
diff --git a/testing/txt2man/APKBUILD b/testing/txt2man/APKBUILD
new file mode 100644
index 000000000..72079b72f
--- /dev/null
+++ b/testing/txt2man/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=txt2man
+pkgver=1.5.6
+pkgrel=0
+pkgdesc="Convert flat ASCII text to man page format"
+url="http://mvertes.free.fr/txt2man/"
+arch="noarch"
+license="GPLv2+"
+depends="gawk"
+makedepends=
+install=""
+subpackages="$pkgname-doc"
+source="http://mvertes.free.fr/download/txt2man-$pkgver.tar.gz
+ fixbashism.patch
+ makefile.patch"
+
+_builddir="$srcdir"/txt2man-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" prefix=/usr mandir=/usr/share/man \
+ install || return 1
+}
+
+md5sums="f301b3dc1872fab1b7740f9f69ff281b txt2man-1.5.6.tar.gz
+586f2e01dde9ef07a2734866797f8646 fixbashism.patch
+311fe2373e54b15eda845467ce68cd72 makefile.patch"
diff --git a/testing/txt2man/fixbashism.patch b/testing/txt2man/fixbashism.patch
new file mode 100644
index 000000000..f31059d88
--- /dev/null
+++ b/testing/txt2man/fixbashism.patch
@@ -0,0 +1,14 @@
+--- ./bookman.orig
++++ ./bookman
+@@ -83,9 +83,9 @@
+ shift $(($OPTIND - 1))
+ date=${date:-$(date +'%d %B %Y')}
+
+-[[ $1 ]] || set -- $(while read; do echo $REPLY; done)
++[ -n "$1" ] || set -- $(while read REPLY; do echo $REPLY; done)
+
+-[[ $outfile ]] && post="$post >$outfile"
++[ -n "$outfile" ] && post="$post >$outfile"
+
+ {
+ # Compute table of content from postscript output.
diff --git a/testing/txt2man/makefile.patch b/testing/txt2man/makefile.patch
new file mode 100644
index 000000000..617d4b0d2
--- /dev/null
+++ b/testing/txt2man/makefile.patch
@@ -0,0 +1,23 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -1,5 +1,7 @@
+ # Makefile
+ prefix ?= /usr/local
++bindir ?= $(prefix)/bin
++mandir ?= $(prefix)/share/man
+ version = txt2man-1.5.6
+ BIN = src2man bookman txt2man
+ MAN1 = src2man.1 txt2man.1 bookman.1
+@@ -7,9 +9,9 @@
+ all: $(MAN1)
+
+ install: $(MAN1)
+- mkdir -p $(prefix)/bin $(prefix)/man/man1
+- cp $(BIN) $(prefix)/bin/
+- cp $(MAN1) $(prefix)/man/man1
++ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
++ cp $(BIN) $(DESTDIR)$(bindir)
++ cp $(MAN1) $(DESTDIR)$(mandir)/man1
+
+ clean:
+ rm -f *.1 *.txt *.ps *.pdf *.html