aboutsummaryrefslogtreecommitdiffstats
path: root/main/mdocml/APKBUILD
blob: 9e5537a6dc183e08356322a27b2ff1a1046c0786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer:  Natanael Copa <ncopa@alpinelinux.org>
pkgname=mdocml
pkgver=1.14.1
pkgrel=0
pkgdesc="mdoc/man compiler"
url="http://mdocml.bsd.lv/"
arch="all"
license="BSD"
depends=""
makedepends="zlib-dev"
install="$pkgname.post-deinstall"
triggers="$pkgname-apropos.trigger=/usr/share/man/*"
subpackages="$pkgname-doc $pkgname-dev man::noarch $pkgname-apropos $pkgname-soelim"
source="http://mdocml.bsd.lv/snapshots/$pkgname-$pkgver.tar.gz
	shared-libmandoc.patch
	pager.patch
	mdocml-apropos.trigger
	man.conf
	"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	default_prepare || return 1
	cd "$builddir"
	cat >configure.local<<EOF
PREFIX=/usr
MANDIR=/usr/share/man
LIBDIR=/usr/lib
CFLAGS="$CFLAGS"
EOF
}

build() {
	cd "$builddir"
	./configure || return 1
	make || return 1
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" base-install lib-install || return 1
	install -Dm644 "$srcdir"/man.conf "$pkgdir"/etc/man.conf || return 1
	for X in usr/bin/apropos usr/bin/whatis usr/bin/man usr/sbin/makewhatis
		do
			rm -f "$pkgdir/$X" || return 1
			ln -s /usr/bin/mandoc "$pkgdir/$X" || return 1
		done
}

man() {
	pkgdesc="dummy package for upgrade compatibility.  this can safely be removed"
	depends="mdocml"
	mkdir -p "$subpkgdir"
}

apropos() {
	pkgdesc="makewhatis/whatis and apropos tools and index"
	mkdir -p "$subpkgdir"/usr/sbin "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apropos \
		"$pkgdir"/usr/bin/whatis \
		"$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/sbin/makewhatis \
		"$subpkgdir"/usr/sbin/ || return 1
}

soelim() {
	pkgdesc="so elimination tool"
	depends=""
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/soelim \
		"$subpkgdir"/usr/bin/ || return 1
}

sha512sums="90f00297d162faa404fe4e530f95422c210b8d23a0be5a115c2c8c17255d366e224444901842affb06ed8aaf8febd3e5c79966ff713fa7daf00e8c48b7a857c6  mdocml-1.14.1.tar.gz
ca0f68f6d3d67800eaae7649dacddd04b9159c636bc922840cdb30b741026e708a9527571af656b22642c83b2dc0f9cd9f0b83b43db7a64b0e15fb0654e935a6  shared-libmandoc.patch
04947a275df99298591c2a46fb81b74c7c3fcb9f3cf8fb718cf1e32eeae5409e90a3bca89e542f8aa1b30792e837fd3d716303a636d1a3ec165fbb9529546a64  pager.patch
704bc159acfc639e10c7d505372d303cb5784c8e9eb30084236ad89978978d4ba74f3127d4597d78594b64182c47a00c011f8bb3271d2b784f03a2a411ccb1d8  mdocml-apropos.trigger
0723c32ab70e5b1c77768ca78d7437b26bed19b90b27876b10cc463359c41332befc0105fc1e23ceae48de5a892f1aa7ac60ef7eb0b6b8f1616726c4300632fe  man.conf"