blob: a534ffe9298561038fe9b8f254083d53bd1e8b5b (
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
|
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PV=${PV/./}
DESCRIPTION="OpenBSD manual pages"
HOMEPAGE="https://man.openbsd.org"
BASE_URI="https://ftp.openbsd.org/pub/OpenBSD/${PV}/amd64"
SRC_URI="
${BASE_URI}/comp${MY_PV}.tgz
${BASE_URI}/man${MY_PV}.tgz
"
S="${WORKDIR}/usr/share/man"
LICENSE="BSD BSD-2 BSD-4 ISC MIT icu openssl"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
src_prepare() {
default
ebegin "Renaming sections to prevent collision"
find . -maxdepth 1 -name 'man*' -execdir mv '{}' '{}'bsd \; || die
find . -type f -execdir mv '{}' '{}'bsd \; || die
find . -type f -execdir sed -i '{}' \
-e 's:^\.Dt \S\+ \S\+:\0bsd:' \
-e 's:^\(\.TH \S\+ "\?\)\([0-9a-z]\+\):\1\2bsd:' \; || die
eend 0
}
src_install() {
insinto /usr/share/man
doins -r *
}
pkg_postinst() {
elog "To read an OpenBSD manpage, add 'bsd' suffix to its section name."
elog "For example:"
elog "$ man -s 9bsd style"
}
|