1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
|
6 |
inherit eapi9-ver
|
|
7 |
|
6 |
8 |
# Maintenance notes:
|
7 |
9 |
# - Upstream are very friendly, do approach them if have any questions;
|
8 |
10 |
#
|
... | ... | |
22 |
24 |
|
23 |
25 |
DESCRIPTION="A somewhat comprehensive collection of Linux man pages"
|
24 |
26 |
HOMEPAGE="https://www.kernel.org/doc/man-pages/"
|
|
27 |
|
25 |
28 |
if [[ ${PV} == 9999 ]] ; then
|
26 |
29 |
EGIT_REPO_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git"
|
27 |
30 |
inherit git-r3
|
... | ... | |
34 |
37 |
if [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] ; then
|
35 |
38 |
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-gentoo.tar.xz"
|
36 |
39 |
else
|
|
40 |
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alejandro-colomar.asc
|
|
41 |
inherit verify-sig
|
|
42 |
|
37 |
43 |
SRC_URI="
|
38 |
44 |
https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.xz
|
39 |
45 |
https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.xz
|
|
46 |
verify-sig? (
|
|
47 |
https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.sign
|
|
48 |
https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.sign
|
|
49 |
)
|
40 |
50 |
"
|
|
51 |
|
|
52 |
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-alejandro-colomar )"
|
41 |
53 |
fi
|
42 |
54 |
|
43 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos"
|
|
55 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
|
44 |
56 |
fi
|
45 |
57 |
|
46 |
58 |
SRC_URI+="
|
... | ... | |
55 |
67 |
IUSE="l10n_ja l10n_ru l10n_zh-CN ${MY_L10N[@]/#/l10n_}"
|
56 |
68 |
RESTRICT="binchecks"
|
57 |
69 |
|
58 |
|
BDEPEND="
|
|
70 |
BDEPEND+="
|
59 |
71 |
app-alternatives/bc
|
60 |
72 |
"
|
61 |
73 |
# Block packages that used to install colliding man pages:
|
... | ... | |
79 |
91 |
unset lang
|
80 |
92 |
|
81 |
93 |
src_unpack() {
|
82 |
|
default
|
|
94 |
if [[ ${PV} == 9999 ]] ; then
|
|
95 |
git-r3_src_unpack
|
|
96 |
return
|
|
97 |
fi
|
|
98 |
|
|
99 |
if [[ ${PV} != *_rc* ]] && ! [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] && use verify-sig ; then
|
|
100 |
# Upstream sign the decompressed .tar
|
|
101 |
einfo "Unpacking ${P}.tar.xz ..."
|
|
102 |
verify-sig_verify_detached - "${DISTDIR}"/${P}.tar.sign \
|
|
103 |
< <(xz -cd "${DISTDIR}"/${P}.tar.xz | tee >(tar -xf -))
|
|
104 |
assert "Unpack failed"
|
83 |
105 |
|
84 |
|
[[ ${PV} == 9999 ]] && git-r3_src_unpack
|
|
106 |
unpack man-pages-gentoo-${GENTOO_PATCH}.tar.bz2
|
|
107 |
else
|
|
108 |
default
|
|
109 |
fi
|
85 |
110 |
}
|
86 |
111 |
|
87 |
112 |
src_prepare() {
|
... | ... | |
110 |
135 |
}
|
111 |
136 |
|
112 |
137 |
pkg_postinst() {
|
113 |
|
for ver in ${REPLACING_VERSIONS} ; do
|
114 |
|
if ver_test ${ver} -lt 5.13-r2 ; then
|
115 |
|
# Avoid ACCEPT_LICENSE issues for users by default
|
116 |
|
# bug #871636
|
117 |
|
ewarn "This version of ${PN} no longer depends on sys-apps/man-pages-posix!"
|
118 |
|
ewarn "Please install sys-apps/man-pages-posix yourself if needed."
|
119 |
|
break
|
120 |
|
fi
|
121 |
|
done
|
|
138 |
if ver_replacing -lt 5.13-r2 ; then
|
|
139 |
# Avoid ACCEPT_LICENSE issues for users by default
|
|
140 |
# bug #871636
|
|
141 |
ewarn "This version of ${PN} no longer depends on sys-apps/man-pages-posix!"
|
|
142 |
ewarn "Please install sys-apps/man-pages-posix yourself if needed."
|
|
143 |
fi
|
122 |
144 |
}
|