mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
5d4139f8bd
Directory and PORTNAME changed to match normalised name in release tarball; consumers updated to match. Although setuptools itself is specified as a run dependency in the Python package metadata, it is currently left out here to prevent environment pollution until at least PR 270510 is committed. Additionally, this version of setuptools-scm requires setuptools>=61, which means this version is only meant for USE_PYTHON=pep517 ports as all USE_PYTHON=distutils ports will switch to devel/py-setuptools58 also after PR 270510. science/py-emmet-core is switched to devel/py-setuptools_scm7 accordingly, as it specifies setuptools-scm<8. devel/py-{flit-scm,hatch-vcs} have ${PY_SETUPTOOLS} added to RUN_DEPENDS to compensate. Further details: https://wiki.freebsd.org/Python/setuptools Reported by: yuri Co-authored by: matthew Exp-run by: antoine (earlier iteration) Approved by: yuri (science/py-emmet-core, previous iteration) PR: 272134 Differential Revision: https://reviews.freebsd.org/D39288
73 lines
3.5 KiB
Makefile
73 lines
3.5 KiB
Makefile
PORTNAME= borgbackup
|
|
DISTVERSION= 1.2.7
|
|
PORTREVISION= 0
|
|
CATEGORIES= archivers python
|
|
MASTER_SITES= PYPI
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= mandree@FreeBSD.org
|
|
COMMENT= Deduplicating backup program
|
|
WWW= https://pypi.org/project/borgbackup/
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
# note that borgbackup pins the msgpack version range per patchlevel version!
|
|
_BB_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack>=1.0.2<1.0.7_99:devel/py-msgpack@${PY_FLAVOR}
|
|
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=1.7:devel/py-setuptools-scm@${PY_FLAVOR} \
|
|
${_BB_DEPENDS}
|
|
LIB_DEPENDS= liblz4.so:archivers/liblz4 \
|
|
libzstd.so:archivers/zstd \
|
|
libxxhash.so:devel/xxhash
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=19.0:devel/py-packaging@${PY_FLAVOR} \
|
|
${_BB_DEPENDS}
|
|
TEST_DEPENDS= ${RUN_DEPENDS} \
|
|
${PYTHON_PKGNAMEPREFIX}tox>3.2:devel/py-tox@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}virtualenv>=0:devel/py-virtualenv@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}pkgconfig>=0:devel/py-pkgconfig@${PY_FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
|
|
fakeroot:security/fakeroot
|
|
USES= pkgconfig python ssl
|
|
USE_PYTHON= autoplist distutils
|
|
MAKE_ENV= BORG_OPENSSL_PREFIX=${OPENSSLBASE}
|
|
|
|
OPTIONS_DEFINE= FUSE
|
|
OPTIONS_DEFAULT= FUSE
|
|
|
|
FUSE_DESC= Support to mount locally borg backup files
|
|
FUSE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}llfuse>0:devel/py-llfuse@${PY_FLAVOR}
|
|
|
|
_BORGHOME=${WRKDIR}/testhome
|
|
_BORGENV=-i BORG_PASSPHRASE=secret123 PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} HOME=${_BORGHOME}
|
|
post-install:
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/share/man/man1/
|
|
${INSTALL_MAN} ${WRKSRC}/docs/man/* ${STAGEDIR}${PREFIX}/share/man/man1/
|
|
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/borg/ -name "*.so" \
|
|
-exec ${STRIP_CMD} {} \;
|
|
@${ECHO_MSG} "----> running borg smoke tests"
|
|
${MKDIR} ${_BORGHOME}
|
|
${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/borg -V
|
|
${RM} -r ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg init --encryption=repokey ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg key export ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg create ${WRKDIR}/borgrepo::test1 ${WRKSRC}
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg create ${WRKDIR}/borgrepo::test2 ${WRKSRC} ${STAGEDIR}
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg info ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg prune --keep-last 1 ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
|
|
${ECHO_CMD} YES \
|
|
| ${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --repair ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg compact --progress ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg check --verify-data ${WRKDIR}/borgrepo
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg extract --dry-run --progress ${WRKDIR}/borgrepo::test2
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg export-tar ${WRKDIR}/borgrepo::test2 - >/dev/null
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg list ${WRKDIR}/borgrepo
|
|
# long output - ${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg list ${WRKDIR}/borgrepo::test2 | ${GREP} -v ^d
|
|
${SETENV} ${_BORGENV} ${STAGEDIR}${PREFIX}/bin/borg info ${WRKDIR}/borgrepo
|
|
|
|
do-test:
|
|
cd ${WRKSRC} && ${SETENV} ${_BORGENV} ${TEST_ENV} tox-${PYTHON_VER} -e ${PY_FLAVOR} -vv
|
|
|
|
.include <bsd.port.mk>
|