diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-09-15 10:09:37 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-09-15 14:25:29 +0200 |
commit | 6e2a9ca20c9c50bba2052f18fbead292f51188ed (patch) | |
tree | 59328730c1b7e1c87c45b01049c206e1f611e378 /dev-util/0xtools | |
parent | dev-util/0xtools: new package; add 1.2.4 (diff) | |
download | gentoo-6e2a9ca20c9c50bba2052f18fbead292f51188ed.tar.gz gentoo-6e2a9ca20c9c50bba2052f18fbead292f51188ed.tar.bz2 gentoo-6e2a9ca20c9c50bba2052f18fbead292f51188ed.zip |
dev-util/0xtools: add live 9999
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-util/0xtools')
-rw-r--r-- | dev-util/0xtools/0xtools-9999.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-util/0xtools/0xtools-9999.ebuild b/dev-util/0xtools/0xtools-9999.ebuild new file mode 100644 index 000000000000..3b7026647b97 --- /dev/null +++ b/dev-util/0xtools/0xtools-9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-single-r1 systemd toolchain-funcs + +DESCRIPTION="Always-on profiling for production systems" +HOMEPAGE="https://0x.tools/ + https://github.com/tanelpoder/0xtools/" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/tanelpoder/${PN}.git" +else + SRC_URI="https://github.com/tanelpoder/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS}" +BDEPEND="${RDEPEND}" + +DOCS=( CHANGELOG.md README.md ) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" + + sed -e "/^sys.path.append/s|(.*)|('$(python_get_sitedir)/${PN}')|" \ + -i bin/psn -i bin/schedlat || die +} + +src_install() { + # C executables and scripts + exeinto /usr/bin + doexe bin/{run_xcapture.sh,run_xcpu.sh,vmtop,xcapture} + + # Python executables + python_domodule lib/${PN} + python_doscript bin/psn + python_doscript bin/schedlat + + # Service + systemd_dounit xcapture.service + systemd_dounit xcapture-restart.service + systemd_dounit xcapture-restart.timer + + # Service config + insinto /etc/default + newins xcapture.default xcapture + + # Service logs + keepdir /var/log/xcapture + + einstalldocs +} |