remove ia64 keywords
[gentoo-zh.git] / app-shells / blesh / blesh-9999.ebuild
blob886b1a8b0e9516dbd8025a746da33e18c3159c52
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 MY_PV="${PV/_pre/-devel}"
8 DESCRIPTION="A line editor written in pure Bash with enhanced features"
9 HOMEPAGE="https://github.com/akinomyoga/ble.sh"
11 if [[ ${PV} == 9999 ]] ; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/akinomyoga/ble.sh.git"
14 else
15         GIT_COMMIT_CONTRIB=9700c79eb97b3b5f0f06f7019097dc9d3ee93404
16         BLESH_CONTRIB_PV="0_pre20230403"
17         SRC_URI="
18                 https://github.com/akinomyoga/ble.sh/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz
19                 https://github.com/akinomyoga/blesh-contrib/archive/${GIT_COMMIT_CONTRIB}.tar.gz
20                         -> blesh-contrib-${BLESH_CONTRIB_PV}.tar.gz
21         "
22         S="${WORKDIR}/ble.sh-${MY_PV}"
23         KEYWORDS="~amd64"
26 LICENSE="BSD MIT"
27 SLOT="0"
28 IUSE="doc"
29 RDEPEND=">=app-shells/bash-3.0"
31 PATCHES=( "${FILESDIR}/${P}-no-git.patch" )
33 if [[ ${PV} != 9999 ]]; then
34         PATCHES+=( "${FILESDIR}/${P}-optional-docs.patch" )
37 src_unpack() {
38         if [[ ${PV} == 9999 ]] ; then
39                 git-r3_src_unpack
40         else
41                 default
42                 rmdir "${S}/contrib" || die
43                 mv "${WORKDIR}/blesh-contrib-${GIT_COMMIT_CONTRIB}" "${S}/contrib" || die
44         fi
47 src_compile() {
48         emake USE_DOC=$(usex doc)
51 src_install() {
52         emake install \
53                 USE_DOC=$(usex doc) \
54                 DESTDIR="${D}" \
55                 PREFIX="${EPREFIX}/usr" \
56                 INSDIR_DOC="${ED}/usr/share/doc/${PF}"
57         insinto /usr/share/blesh/lib
58         doins "${FILESDIR}/_package.bash"
61 pkg_postinst() {
62         elog "Remember to enable ble.sh in your ~/.bashrc"
63         elog "by adding this line at the top of ~/.bashrc:"
64         elog '[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach'
65         elog "and add this line at the end of ~/.bashrc:"
66         elog '[[ ${BLE_VERSION-} ]] && ble-attach'