tkurbad-overlay/dev-php/theseer-tokenizer/theseer-tokenizer-1.2.3.ebuild

47 lines
906 B
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN="Tokenizer"
DESCRIPTION="PHP Autoload Builder"
HOMEPAGE="https://github.com/theseer/${MY_PN}"
SRC_URI="https://github.com/theseer/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86"
RDEPEND="dev-lang/php:*[cli,fileinfo(-),tokenizer(-)]
dev-php/fedora-autoloader
dev-php/theseer-Autolood"
src_prepare() {
default
# Set version
sed -i \
-e "s/%development%/${PV}/" \
phpab.php \
composer/bin/phpab \
|| die
./phpab.php \
--output src/autoload.php \
--template "${FILESDIR}"/autoload.php.tpl \
--basedir src \
src || die
}
src_install() {
insinto /usr/share/php/TheSeer/${MY_PN}
doins -r src/*
dobin "${S}"/composer/bin/phpab
einstalldocs
}