summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gregoratto2019-04-18 21:43:24 +1000
committerStephen Gregoratto2019-04-18 21:46:31 +1000
commit27ab5e1e8a7b77734988aa5f20bf68e039622099 (patch)
tree88477a8ecbe8a0bb43ba8c623d3f95e9b385a08b
downloadaur-27ab5e1e8a7b77734988aa5f20bf68e039622099.tar.gz
Initial Release
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD32
-rw-r--r--docbook2mdoc.patch38
3 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0dd12e54ce5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = docbook2mdoc
+ pkgdesc = DocBook refentry to mdoc(7) converter
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://mandoc.bsd.lv/docbook2mdoc/
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ license = custom: ISC
+ makedepends = libbsd
+ source = https://mandoc.bsd.lv/docbook2mdoc//snapshots/docbook2mdoc-1.0.0.tgz
+ source = docbook2mdoc.patch
+ sha256sums = 940b774abfc9fb60c8d9cf46cecbf704c5a60fbb4f6ca85073fdfda26706629c
+ sha256sums = c2570e46266fe64d6493095ec29da1b77919bc7fcc314e1d40e9a383e3a7a796
+
+pkgname = docbook2mdoc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5938b5503aa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Stephen Gregoratto <dev@sgregoratto.me>
+pkgname=docbook2mdoc
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='DocBook refentry to mdoc(7) converter'
+license=('custom: ISC')
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+url='https://mandoc.bsd.lv/docbook2mdoc/'
+makedepends=('libbsd')
+source=("$url/snapshots/$pkgname-$pkgver.tgz"
+ "$pkgname.patch")
+sha256sums=('940b774abfc9fb60c8d9cf46cecbf704c5a60fbb4f6ca85073fdfda26706629c'
+ 'c2570e46266fe64d6493095ec29da1b77919bc7fcc314e1d40e9a383e3a7a796')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i "${srcdir}/$pkgname.patch"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="${pkgdir}" install
+
+ install -d "${pkgdir}/usr/share/licenses/$pkgname"
+ sed -n '3,16p' docbook2mdoc.c | cut -c 4- \
+ > "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/docbook2mdoc.patch b/docbook2mdoc.patch
new file mode 100644
index 00000000000..1c74bd039c3
--- /dev/null
+++ b/docbook2mdoc.patch
@@ -0,0 +1,38 @@
+Chunk 1-2: Correct prefix/dirs for Arch
+Chunk 3: Enable libbsd TAILQ_.*_SAFE macros
+diff -ura docbook2mdoc-1.0.0-old/Makefile docbook2mdoc-1.0.0-new/Makefile
+--- docbook2mdoc-1.0.0-old/Makefile 2019-04-18 04:31:23.000000000 +1000
++++ docbook2mdoc-1.0.0-new/Makefile 2019-04-18 21:30:56.454641858 +1000
+@@ -1,7 +1,7 @@
+ VERSION = 1.0.0
+ CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
+ WWWPREFIX = /var/www/vhosts/mdocml.bsd.lv/htdocs/docbook2mdoc
+-PREFIX = /usr/local
++PREFIX = /usr
+
+ HEADS = node.h parse.h macro.h format.h
+ SRCS = node.c parse.c macro.c docbook2mdoc.c tree.c main.c
+@@ -20,9 +20,9 @@
+
+ install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+- mkdir -p $(DESTDIR)$(PREFIX)/man/man1
++ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+ install -m 0755 docbook2mdoc $(DESTDIR)$(PREFIX)/bin
+- install -m 0444 docbook2mdoc.1 $(DESTDIR)$(PREFIX)/man/man1
++ install -m 0444 docbook2mdoc.1 $(DESTDIR)$(PREFIX)/share/man/man1
+
+ installwww: www
+ mkdir -p $(WWWPREFIX)/snapshots
+diff -ura docbook2mdoc-1.0.0-old/node.h docbook2mdoc-1.0.0-new/node.h
+--- docbook2mdoc-1.0.0-old/node.h 2019-04-18 04:31:23.000000000 +1000
++++ docbook2mdoc-1.0.0-new/node.h 2019-04-18 21:17:26.519395568 +1000
+@@ -15,7 +15,7 @@
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+-#include <sys/queue.h>
++#include <bsd/sys/queue.h>
+
+ /*
+ * The interface of the DocBook syntax tree.