summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Wölfing2022-03-17 14:16:41 +0100
committerDennis Wölfing2022-03-17 14:16:41 +0100
commit28ca9c8b5d71728553f4c1bd8b33017331927c50 (patch)
tree1d22df4d95cf22df81a8b34ab360869d02d76191
downloadaur-28ca9c8b5d71728553f4c1bd8b33017331927c50.tar.gz
Add mandoc-noconflict package.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD55
-rw-r--r--configure.local24
-rw-r--r--mandoc.service11
-rw-r--r--mandoc.timer7
5 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65a4cfd405f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = mandoc-noconflict
+ pkgdesc = A suite of tools compiling mdoc from the OpenBSD project - does not conflict with man-db
+ pkgver = 1.14.6
+ pkgrel = 1
+ url = https://mdocml.bsd.lv/
+ arch = x86_64
+ license = ISC
+ depends = zlib
+ provides = mandoc
+ conflicts = mandoc
+ source = https://mdocml.bsd.lv//snapshots/mandoc-1.14.6.tar.gz
+ source = configure.local
+ source = mandoc.service
+ source = mandoc.timer
+ sha256sums = 8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c
+ sha256sums = 23cd0e478aa08890bb2c18ff376e9c7ec84e45693f1b5457ecf7615f9c032a18
+ sha256sums = 2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6
+ sha256sums = 74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4
+
+pkgname = mandoc-noconflict
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5108bde4241f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Dennis Wölfing <denniswoelfing at gmx dot de>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Eli Schwartz <eschwartz@archlinux.org>
+# Contributor: Jakub Klinkovský <j.l.k@gmx.com>
+# Contributor: Matheus de Alcantara <matheus.de.alcantara@gmail.com>
+
+pkgname=mandoc-noconflict
+pkgver=1.14.6
+pkgrel=1
+pkgdesc='A suite of tools compiling mdoc from the OpenBSD project - does not conflict with man-db'
+arch=('x86_64')
+url='https://mdocml.bsd.lv/'
+license=('ISC')
+depends=('zlib')
+provides=('mandoc')
+conflicts=('mandoc')
+source=("${url}/snapshots/mandoc-${pkgver}.tar.gz"
+ 'configure.local'
+ 'mandoc.service'
+ 'mandoc.timer')
+sha256sums=('8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c'
+ '23cd0e478aa08890bb2c18ff376e9c7ec84e45693f1b5457ecf7615f9c032a18'
+ '2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6'
+ '74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4')
+
+prepare() {
+ cd "${srcdir}"/mandoc-${pkgver}
+
+ cp ../configure.local .
+}
+
+build() {
+ cd "${srcdir}"/mandoc-${pkgver}
+
+ # apply CFLAGS and LDFLAGS from makepkg.conf
+ {
+ echo "CFLAGS=${CFLAGS@Q}"
+ echo "LDFLAGS=${LDFLAGS@Q}"
+ } >> configure.local
+
+ ./configure
+ make
+}
+
+package() {
+ cd "${srcdir}"/mandoc-${pkgver}
+
+ DESTDIR="${pkgdir}" make install
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ install -Dm644 "${srcdir}"/mandoc.timer "${pkgdir}"/usr/lib/systemd/system/mandoc.timer
+ install -Dm644 "${srcdir}"/mandoc.service "${pkgdir}"/usr/lib/systemd/system/mandoc.service
+ install -dm755 "${pkgdir}"/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../mandoc.timer "${pkgdir}"/usr/lib/systemd/system/multi-user.target.wants/mandoc.timer
+}
diff --git a/configure.local b/configure.local
new file mode 100644
index 000000000000..23132df6ef94
--- /dev/null
+++ b/configure.local
@@ -0,0 +1,24 @@
+# Arch $MANPATH.
+MANPATH_DEFAULT=/usr/local/share/man:/usr/share/man
+
+# Arch paths.
+PREFIX=/usr
+SBINDIR=$PREFIX/bin
+MANDIR=$PREFIX/share/man
+
+# These conflict with man(7) and mdoc(7) from man-pages.
+MANM_MAN=mandoc_man
+MANM_MDOC=mandoc_mdoc
+
+# These conflict with binaries and manpages from groff.
+BINM_SOELIM=msoelim
+MANM_ROFF=mandoc_roff
+
+# These conflict with binaries and manpages from man-db.
+BINM_APROPOS=mapropos
+BINM_CATMAN=mcatman
+BINM_MAN=mman
+BINM_WHATIS=mwhatis
+
+# catman(8) is disabled by default.
+BUILD_CATMAN=1
diff --git a/mandoc.service b/mandoc.service
new file mode 100644
index 000000000000..a9f903b4ebec
--- /dev/null
+++ b/mandoc.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Update manpage database
+RequiresMountsFor=/usr/share/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/makewhatis
+CPUSchedulingPolicy=batch
+Nice=19
+IOSchedulingClass=idle
+IOSchedulingPriority=7
diff --git a/mandoc.timer b/mandoc.timer
new file mode 100644
index 000000000000..86d91cb6033a
--- /dev/null
+++ b/mandoc.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily manpage database update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true