diff options
Diffstat (limited to 'archivers/py-borgbackup/Makefile')
-rw-r--r-- | archivers/py-borgbackup/Makefile | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/archivers/py-borgbackup/Makefile b/archivers/py-borgbackup/Makefile index ec020d2659a9..ae58736a81ad 100644 --- a/archivers/py-borgbackup/Makefile +++ b/archivers/py-borgbackup/Makefile @@ -1,23 +1,30 @@ PORTNAME= borgbackup -DISTVERSION= 1.1.18 -PORTREVISION= 1 +DISTVERSION= 1.2.2 CATEGORIES= archivers python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -MAINTAINER= jjuanino@gmail.com +MAINTAINER= mandree@FreeBSD.org COMMENT= Deduplicating backup program LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.7:devel/py-setuptools_scm@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.7:devel/py-setuptools_scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}msgpack>=1.0:devel/py-msgpack@${PY_FLAVOR} 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} - -USES= python ssl +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=19.0:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}msgpack>=1.0:devel/py-msgpack@${PY_FLAVOR} +MAKE_ENV= BORG_OPENSSL_PREFIX=${OPENSSLBASE} +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:3.8+ ssl USE_PYTHON= autoplist distutils OPTIONS_DEFINE= FUSE @@ -26,9 +33,34 @@ OPTIONS_DEFAULT= FUSE FUSE_DESC= Support to mount locally borg backup files FUSE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}llfuse>0:devel/py-llfuse@${PY_FLAVOR} +_BORGENV=BORG_PASSPHRASE=secret123 PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} post-install: - ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/borg -V + ${MKDIR} ${STAGEDIR}${MAN1PREFIX}/share/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/docs/man/* ${STAGEDIR}${MAN1PREFIX}/share/man/man1/ @${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/borg/ -name "*.so" \ -exec ${STRIP_CMD} {} \; + @${ECHO_MSG} "----> running borg smoke tests" + ${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} ${TEST_ENV} ${_BORGENV} tox-${PYTHON_VER} -e ${PY_FLAVOR} -vv .include <bsd.port.mk> |