tkurbad-overlay/dev-php/myclabs-deep-copy/myclabs-deep-copy-1.13.4.ebuild

41 lines
781 B
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Create deep copies (clones) of your objects"
HOMEPAGE="https://github.com/myclabs/DeepCopy"
SRC_URI="https://github.com/myclabs/DeepCopy/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/DeepCopy-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
BDEPEND="dev-php/theseer-Autoload"
RDEPEND="
>=dev-lang/php-7.4:*
dev-php/fedora-autoloader
"
src_prepare() {
default
phpab \
--quiet \
--output autoload.php \
--template fedora2 \
--basedir . \
. \
|| die
echo "require_once __DIR__ . \"/src/DeepCopy/deep_copy.php\";" >> autoload.php
}
src_install() {
insinto "/usr/share/php/DeepCopy"
doins -r *.php LICENSE src
}