1# Contributor: Leo <thinkabit.ukim@gmail.com>
2# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
3# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
4pkgname=mandoc
5pkgver=1.14.6
6pkgrel=14
7pkgdesc="mandoc (formerly mdocml) UNIX manpage compiler toolset"
8url="https://mandoc.bsd.lv/"
9arch="all"
10license="ISC"
11makedepends="zlib-dev"
12checkdepends="perl"
13install="$pkgname-apropos.post-deinstall"
14replaces="mdocml"
15provides="mdocml=$pkgver-r$pkgrel"
16subpackages="$pkgname-doc $pkgname-dev $pkgname-apropos $pkgname-soelim"
17source="https://mandoc.bsd.lv/snapshots/mandoc-$pkgver.tar.gz
18 dynamic-tagfile-support.patch
19 shared-libmandoc.patch
20 outdated-warn-disable.patch
21 $pkgname.cron
22 "
23
24# higher than community/man-db for this
25provides="doc-provider mdocml=$pkgver-r$pkgrel"
26provider_priority=100
27
28prepare() {
29 default_prepare
30
31 cat >configure.local<<-__EOF__
32 PREFIX=/usr
33 MANDIR=/usr/share/man
34 LIBDIR=/usr/lib
35 CFLAGS="$CFLAGS"
36 UTF8_LOCALE="en_US.UTF-8"
37 MANPATH_DEFAULT="/usr/share/man:/usr/local/man:/usr/local/share/man"
38 MANPATH_BASE="/usr/share/man"
39 LN="ln -sf"
40__EOF__
41}
42
43build() {
44 ./configure
45 make
46}
47
48check() {
49 LD_LIBRARY_PATH="$builddir" make regress
50}
51
52package() {
53 make -j1 DESTDIR="$pkgdir" base-install lib-install
54}
55
56apropos() {
57 pkgdesc="makewhatis/whatis and apropos tools and index"
58 amove usr/bin/apropos usr/bin/whatis usr/sbin/makewhatis
59 install -Dm755 "$srcdir"/$pkgname.cron \
60 "$subpkgdir"/etc/periodic/daily/makewhatis
61}
62
63soelim() {
64 pkgdesc="so elimination tool"
65 depends=""
66 amove usr/bin/soelim
67}
68
69sha512sums="
7054286070812a47b629f68757046d3c9a1bdd2b5d1c3b84a5c8e4cb92f1331afa745443f7238175835d8cfbe5b8dd442e00c75c3a5b5b8f8efd8d2ec8f636dad4 mandoc-1.14.6.tar.gz
71d84afd0f462dc3c00753f3db5b2690d8f0954b51f5b679667a75f8ea34cb3d2e961d732218b8c1c3a39c209df70ab273b583c4899c56482e7f8761c4b9fea02c dynamic-tagfile-support.patch
72b512bcb8bae11853a3006e2122d7e652806d4bf2234638d8809fd823375b5b0bd590f7d6a90412baffcc3b7b6a0f197a10986728a70f24fe628f91bfb651d266 shared-libmandoc.patch
736eda39920cccb1238b104bb90ac4be2c32883897c72363560d8d39345819cdeff535680e78396052b2b8f981e169ad9b3c30da724def80a1501785d82ce7fa25 outdated-warn-disable.patch
741af9627ee519ecf7d4962db52c83b28f3eb4e9fc6bf38e674bd5e17b21076c3c74c9eed2a1161812f8ac0c75471986b73fcf0acfc7065bc2c15280e1d696a00b mandoc.cron
75"