From 626ccb50005135de023630ed7af0e8aa450d5ba9 Mon Sep 17 00:00:00 2001 From: Rahil Bhimjiani Date: Sat, 23 Sep 2023 22:05:07 +0530 Subject: www-servers/caddy: add live & 2.7.4-r1 1) Add proxy-maint & myself as proxied 2) Improve ebuild with completions, man pages, docs, description, license & misc 3) Add live version and revision for 2.7.4 Closes: https://github.com/gentoo/gentoo/pull/33007 Closes: https://bugs.gentoo.org/910458 Signed-off-by: Rahil Bhimjiani Signed-off-by: Zac Medico --- www-servers/caddy/Manifest | 1 + www-servers/caddy/caddy-2.7.4-r1.ebuild | 86 +++++++++++++++++++++++++++++++++ www-servers/caddy/caddy-9999.ebuild | 86 +++++++++++++++++++++++++++++++++ www-servers/caddy/metadata.xml | 24 ++++++--- 4 files changed, 190 insertions(+), 7 deletions(-) create mode 100644 www-servers/caddy/caddy-2.7.4-r1.ebuild create mode 100644 www-servers/caddy/caddy-9999.ebuild (limited to 'www-servers') diff --git a/www-servers/caddy/Manifest b/www-servers/caddy/Manifest index c40c19e7e203..306f0fd1dbad 100644 --- a/www-servers/caddy/Manifest +++ b/www-servers/caddy/Manifest @@ -5,4 +5,5 @@ DIST caddy-2.6.2.tar.gz 556197 BLAKE2B a3fd7e69a33ee045de7f4b8218d5bb41e1f740c74 DIST caddy-2.6.4-deps.tar.xz 126961712 BLAKE2B 45448376fb368639913360c96074a21b6907a0d573de403d46f150f004b24a0e328c210e6192d6540444bef6b33d4dbff7f44ad129bbe6cdfc344fb108500bf0 SHA512 f8d73a888c6f0e1c1467878162e3c34da35dcfc2ab7232db4f5e7ac5b51b2f91f6a98a07d732a8f17d9523226a21a8a9b1075a474e9d2b5f3c7869ef0a9e892a DIST caddy-2.6.4.tar.gz 568213 BLAKE2B 4837c8511002538ed6d7ac92743a834e76bdba3a35e92a3587ee29911c4a623d37948725a4c20967f3893abe7ce05a88aeb93af294045d722193a68ca7c69bff SHA512 438869a24c0f68e8d742752d3573cf7894c566344f85d0e262ddf26d91c711dd27a0422396bfdd94823c8ee4c7fd24ce222938f3339f1c19e706e64207fc483f DIST caddy-2.7.4-deps.tar.xz 146920768 BLAKE2B 25d99c7d73f7c9a63868ab496f27571d15181cee298e16a83c02b652b8b89cab615969897d11faadfdc3e9ca389783c3b610e219a16b0a146748d0ea2e3309ca SHA512 5cdb95bcf7435a76385d0fc9277bdaa317261698f1bf15b54e081b89bd971927c0f5ca9f42a693127fabca9c6a6eae81978c6b4978ff9962f67a83591d104e6a +DIST caddy-2.7.4-docs.tar.gz 25264 BLAKE2B 2282ac0ddd76b0837d33cf24d01f13ac9c0c8e0abf043cf5ade0ec3a51fda2d7c15589574b159df00e2c25733f10ccc6f4cf6b3a97f9f831aa276f3adee84fd9 SHA512 179a13b89b0da1771dcaf798e33000b60f202804e728d8aca85a23a68b055ee6d12e5f75eb30257a412621ffd105035bd371bd7e448f876eeb91544fd3092344 DIST caddy-2.7.4.tar.gz 625647 BLAKE2B be4749a2298d2e00e2a24324ee31090847be9ec4de49f47715c86e65750d01698b5a4a21990430cc7622fecce5b375ae8e3fb2ef832515ce9dcca8f2d26a9911 SHA512 e988ec4fa526d16b91a86f28fc13c606ab159815d5be45a2ea65bf91b5579a25efc8ff415b0aa98699f72bd3106ed02d49e48303d9c80e7fe6805ade416e7dff diff --git a/www-servers/caddy/caddy-2.7.4-r1.ebuild b/www-servers/caddy/caddy-2.7.4-r1.ebuild new file mode 100644 index 000000000000..a4fc915a0230 --- /dev/null +++ b/www-servers/caddy/caddy-2.7.4-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fcaps go-module systemd shell-completion + +DESCRIPTION="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS" +HOMEPAGE="https://caddyserver.com" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/caddyserver/caddy.git" +else + SRC_URI="https://github.com/caddyserver/caddy/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + SRC_URI+=" https://github.com/caddyserver/dist/archive/refs/tags/v${PV}.tar.gz -> ${P}-docs.tar.gz" + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +LICENSE="Apache-2.0 BSD ECL-2.0 MIT CC0-1.0" +SLOT="0" +RESTRICT="test" +RDEPEND=" + acct-user/http + acct-group/http" +DEPEND="${RDEPEND}" + +FILECAPS=( + -m 755 'cap_net_bind_service=+ep' usr/bin/"${PN}" +) + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + # unpack code + git-r3_src_unpack + + # unpack docs and misc + EGIT_REPO_URI="https://github.com/caddyserver/dist.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/dist-${PV}" + git-r3_src_unpack + + go-module_live_vendor + else + go-module_src_unpack + fi +} + +src_prepare(){ + default + sed -i -e "s|User=caddy|User=http|g;" ../dist-"${PV}"/init/*service || die + sed -i -e "s|Group=caddy|Group=http|g;" ../dist-"${PV}"/init/*service || die +} + +src_compile() { + ego build ./cmd/caddy + for sh in bash fish zsh; do + ./caddy completion "${sh}" > completion."${sh}" || die + done + ./caddy manpage -o manpages || die +} + +src_install() { + default + + dobin "${PN}" + insinto /etc/"${PN}" + newins ../dist-"${PV}"/config/Caddyfile Caddyfile.example + systemd_dounit ../dist-"${PV}"/init/*.service + newinitd "${FILESDIR}/initd" "${PN}" + newconfd "${FILESDIR}/confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotated" "${PN}" + insinto /usr/share/"${PN}" + doins ../dist-"${PV}"/welcome/index.html + + newbashcomp completion.bash "${PN}" + newfishcomp completion.fish "${PN}".fish + newzshcomp completion.zsh _"${PN}" + newdoc ../dist-"${PV}"/init/README.md systemd-services-README.md + doman manpages/* +} + +pkg_postinst() { + fcaps_pkg_postinst +} diff --git a/www-servers/caddy/caddy-9999.ebuild b/www-servers/caddy/caddy-9999.ebuild new file mode 100644 index 000000000000..a4fc915a0230 --- /dev/null +++ b/www-servers/caddy/caddy-9999.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fcaps go-module systemd shell-completion + +DESCRIPTION="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS" +HOMEPAGE="https://caddyserver.com" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/caddyserver/caddy.git" +else + SRC_URI="https://github.com/caddyserver/caddy/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + SRC_URI+=" https://github.com/caddyserver/dist/archive/refs/tags/v${PV}.tar.gz -> ${P}-docs.tar.gz" + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +LICENSE="Apache-2.0 BSD ECL-2.0 MIT CC0-1.0" +SLOT="0" +RESTRICT="test" +RDEPEND=" + acct-user/http + acct-group/http" +DEPEND="${RDEPEND}" + +FILECAPS=( + -m 755 'cap_net_bind_service=+ep' usr/bin/"${PN}" +) + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + # unpack code + git-r3_src_unpack + + # unpack docs and misc + EGIT_REPO_URI="https://github.com/caddyserver/dist.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/dist-${PV}" + git-r3_src_unpack + + go-module_live_vendor + else + go-module_src_unpack + fi +} + +src_prepare(){ + default + sed -i -e "s|User=caddy|User=http|g;" ../dist-"${PV}"/init/*service || die + sed -i -e "s|Group=caddy|Group=http|g;" ../dist-"${PV}"/init/*service || die +} + +src_compile() { + ego build ./cmd/caddy + for sh in bash fish zsh; do + ./caddy completion "${sh}" > completion."${sh}" || die + done + ./caddy manpage -o manpages || die +} + +src_install() { + default + + dobin "${PN}" + insinto /etc/"${PN}" + newins ../dist-"${PV}"/config/Caddyfile Caddyfile.example + systemd_dounit ../dist-"${PV}"/init/*.service + newinitd "${FILESDIR}/initd" "${PN}" + newconfd "${FILESDIR}/confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotated" "${PN}" + insinto /usr/share/"${PN}" + doins ../dist-"${PV}"/welcome/index.html + + newbashcomp completion.bash "${PN}" + newfishcomp completion.fish "${PN}".fish + newzshcomp completion.zsh _"${PN}" + newdoc ../dist-"${PV}"/init/README.md systemd-services-README.md + doman manpages/* +} + +pkg_postinst() { + fcaps_pkg_postinst +} diff --git a/www-servers/caddy/metadata.xml b/www-servers/caddy/metadata.xml index 60a7e98c05ef..e6118a3504ff 100644 --- a/www-servers/caddy/metadata.xml +++ b/www-servers/caddy/metadata.xml @@ -1,11 +1,21 @@ - - zmedico@gentoo.org - Zac Medico - - - caddyserver/caddy - + + zmedico@gentoo.org + Zac Medico + + + proxy-maint@gentoo.org + Proxy Maintainers + + + rahil3108@gmail.com + Rahil Bhimjiani + + + caddyserver/caddy + https://github.com/caddyserver/caddy/issues + https://caddyserver.com/docs/ + -- cgit v1.2.3-65-gdbad