Add target to build package for Gentoo

This commit is contained in:
James Campbell 2025-05-14 01:43:44 -04:00
parent 27e1c517bc
commit 2dfc336288
Signed by: james
GPG Key ID: 2287C33A40DC906A
2 changed files with 10 additions and 5 deletions

View File

@ -14,7 +14,7 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64"
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.bz2 -> ${P}.tar.bz2"
DEPEND="
${PYTHON_DEPS}
@ -31,9 +31,8 @@ S="${WORKDIR}/${PN}"
pkg_nofetch() {
einfo "Please download"
einfo " - ${P}.tgz"
einfo " - ${P}.tar.bz2"
einfo "from ${HOMEPAGE} and place it in your DISTDIR directory."
einfo "The file needs to be renamed to ${P}.tar.gz."
einfo "The file should be owned by portage:portage."
}

View File

@ -15,7 +15,8 @@ SUPPORTED := ubuntu-20.04 \
debian-11 \
rockylinux-8 \
rockylinux-9 \
oraclelinux-7
oraclelinux-7 \
gentoo
##
# These targets are the main ones to use for most things.
@ -28,6 +29,12 @@ SUPPORTED := ubuntu-20.04 \
.PHONY: package-all
all: $(foreach distro_release, $(SUPPORTED), package-$(distro_release))
# Gentoo package (tar.gz) creation
.PHONY: package-gentoo
package-gentoo:
mkdir -p $(BUILD_DIR)/gentoo
tar --transform "s,^\.,$(PACKAGE_NAME)-$(VERSION)," -acjf $(BUILD_DIR)/gentoo/$(PACKAGE_NAME)-$(VERSION).tar.bz2 --exclude $(BUILD_DIR) .
# Create a deb package
.PHONY: package-%
@ -42,7 +49,6 @@ package-%:
--user $(shell id -u):$(shell id -g) \
"$(DISTRO)-packager:$(RELEASE)"
# Create a tarball
tgz:
rm -rf $(BUILD_DIR)/tgz/root