Skip to content

Commit

Permalink
py-josepy, py-acme, certbot: various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamschula committed Feb 22, 2025
1 parent 3bbe0f5 commit 0bd131c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
6 changes: 3 additions & 3 deletions python/py-acme/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PortGroup python 1.0
name py-acme
github.setup certbot certbot 3.2.0 v
github.tarball_from releases
revision 0
revision 1
categories-append security
license Apache-2
maintainers {mps @Schamschula} openmaintainer
Expand Down Expand Up @@ -53,9 +53,9 @@ if {${name} ne ${subport}} {

post-destroot {
xinstall -d ${destroot}${prefix}/share/man/man1
xinstall -m 640 ${worksrcpath}/acme/docs/_build/man/acme-python.1 \
xinstall -m 640 ${worksrcpath}/docs/_build/man/acme-python.1 \
${destroot}${prefix}/share/man/man1/
xinstall -m 640 ${worksrcpath}/acme/docs/_build/man/jws.1 \
xinstall -m 640 ${worksrcpath}/docs/_build/man/jws.1 \
${destroot}${prefix}/share/man/man1/
}
}
Expand Down
11 changes: 6 additions & 5 deletions python/py-josepy/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ PortSystem 1.0
PortGroup python 1.0

name py-josepy
version 2.0.0
# don't upgrade to v 2.0.0 until certbot 4.0.0 is released
version 1.15.0
revision 0
epoch 1
epoch 2
categories-append security
license Apache-2
maintainers {mps @Schamschula} openmaintainer
Expand All @@ -20,9 +21,9 @@ python.versions 39 310 311 312 313

python.pep517_backend poetry

checksums rmd160 5b999de9bb7ce497d6ed828532fdb3621a696deb \
sha256 e7d7acd2fe77435cda76092abe4950bb47b597243a8fb733088615fa6de9ec40 \
size 55767
checksums rmd160 113cc85bf0bee1a5673e848651e267597b717d3a \
sha256 46c9b13d1a5104ffbfa5853e555805c915dcde71c2cd91ce5386e84211281223 \
size 59310

if {${name} ne ${subport}} {
depends_lib-append \
Expand Down
23 changes: 12 additions & 11 deletions security/certbot/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PortSystem 1.0
PortGroup github 1.0
PortGroup python 1.0

# upgrade py-josepy to v 2.0.0 when certbot v 4.0.0 is released
github.setup certbot certbot 3.2.0 v
revision 0
revision 1
categories security
license Apache-2
maintainers {mps @Schamschula} openmaintainer
Expand All @@ -21,6 +22,7 @@ checksums rmd160 a4a993a28209f6ddb849ff658fafae49638c84b5 \
sha256 2939a248def1a8bce661f8d92f9add975108741d7d96fcbfff2936031e72930c \
size 439207


variant python39 conflicts python310 python311 python312 python313 description {Use Python 3.9} {}
variant python310 conflicts python39 python311 python312 python313 description {Use Python 3.10} {}
variant python311 conflicts python39 python310 python312 python313 description {Use Python 3.11} {}
Expand Down Expand Up @@ -51,32 +53,31 @@ depends_lib-append port:py${python.version}-acme \
port:py${python.version}-pyrfc3339 \
port:py${python.version}-tz


subport ${name} {
post-patch {
reinplace "s|/etc/|${prefix}/etc/|" ${worksrcpath}/certbot/compat/misc.py
reinplace "s|/var/lib/|${prefix}/var/db/|" ${worksrcpath}/certbot/compat/misc.py
reinplace "s|/var/log/|${prefix}/var/log/|" ${worksrcpath}/certbot/compat/misc.py
}

variant docs description {Build man pages} {
depends_lib-append \
port:py${python.version}-repoze.sphinx.autointerface \
port:py${python.version}-sphinx \
port:py${python.version}-sphinx_rtd_theme

post-patch {
reinplace "s|/etc/|${prefix}/etc/|" ${worksrcpath}/certbot/compat/misc.py
reinplace "s|/var/lib/|${prefix}/var/db/|" ${worksrcpath}/certbot/compat/misc.py
reinplace "s|/var/log/|${prefix}/var/log/|" ${worksrcpath}/certbot/compat/misc.py
}

post-build {
set env(doc_path) ${worksrcpath}/${name}/docs
set env(doc_path) ${worksrcpath}/docs
set env(python_branch) ${python.branch}
exec sh -c {cd $doc_path && sphinx-build-$python_branch -N -b man . _build/man} >@stdout
}

post-destroot {
xinstall -d ${destroot}${prefix}/share/man/man1
xinstall -d ${destroot}${prefix}/share/man/man7
xinstall -m 640 ${worksrcpath}//${name}/docs/_build/man/certbot.1 \
xinstall -m 640 ${worksrcpath}/docs/_build/man/certbot.1 \
${destroot}${prefix}/share/man/man1/
xinstall -m 640 ${worksrcpath}//${name}/docs/_build/man/certbot.7 \
xinstall -m 640 ${worksrcpath}/docs/_build/man/certbot.7 \
${destroot}${prefix}/share/man/man7/
}
}
Expand Down

0 comments on commit 0bd131c

Please sign in to comment.