# $NetBSD: Makefile,v 1.63 2023/12/09 01:46:30 gdt Exp $ DISTNAME= bup-0.33.2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_GITHUB:=bup/} # bup has two problems that make packaging difficult. One is that # building man pages requires non-portable tools (pandoc). The other # is that it is hosted on github, which makes hosting tarballs # difficult. The combination of this leads to having a branch "man" # in bup's git which has autogenerated man pages. The third problem # is that github.mk assumes that there is one distfile. # (Note to future updating self) We would like to fetch the following files, e.g.: # https://github.com/bup/bup/archive/0.30.tar.gz # https://github.com/bup/bup/archive/28876cde4a3dac518e773860aa7969c106f5390d.tar.gz # Upstream should have a tag, but doesn't. # EXTRACT_SUFX default value is set too late, so using it in SITES.* fails. EXTRACT_SUFX= .tar.gz MAN_TAG= a9757d6fe3509130622a636d35e92049f9e20fce MAN_UNPACK= bup-${MAN_TAG} MAN_DISTFILE= bup-man-${MAN_TAG}${EXTRACT_SUFX} SITES.${MAN_DISTFILE}= -${MASTER_SITE_GITHUB:=bup/bup/archive/}${MAN_TAG}${EXTRACT_SUFX} # Upstream provides html, but we choose not to include it in the package. #HTML_TAG= 66eccb7eb49575d006d193276018d9551ac5b4d4 DISTFILES= ${DEFAULT_DISTFILES} ${MAN_DISTFILE} MAINTAINER= gdt@NetBSD.org HOMEPAGE= https://github.com/bup/bup COMMENT= Highly efficient file backup system based on the git packfile format LICENSE= gnu-gpl-v2 USE_LANGUAGES= c USE_TOOLS+= bash gmake perl:run HAS_CONFIGURE= yes # On macOS 10.13, building bup fails with defaults but builds with # USE_CWRAPPERS=no. The error is # Looking for cpp (/path/to/pkgsrc/sysutils/bup/work/.cwrapper/bin/cpp) (can't run cpp as a pipeline) DEPENDS+= par2-[0-9]*:../../archivers/par2 DEPENDS+= ${PYPKGPREFIX}-tornado-[0-9]*:../../www/py-tornado DEPENDS+= git-base-[0-9]*:../../devel/git-base TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test TEST_DEPENDS+= rsync-[0-9]*:../../net/rsync PYTHON_VERSIONS_INCOMPATIBLE= 27 # py-tornado DIST_MANPAGES= ${WRKDIR}/${MAN_UNPACK} # Note that tests 1) will fail on a fs mounted noatime and 2) need a # lot of space, perhaps 1 GB. TEST_TARGET= test TEST_ENV+= TZ=UTC # bup's configure is buggy and ends up with a make->make symlink. # Whack it to something sensible. Reported upstream 20221204. # # bup's Makefile is buggy in that there is no install target. Whack # Makefile from GNUmakefile so that the install target will be run. # Reported upstream 20221204. post-configure: cd ${WRKSRC}/config/bin && rm -f make && ln -s ${TOOLS_PATH.gmake} make cd ${WRKSRC} && cp -pf GNUmakefile Makefile MAKE_FLAGS+= PREFIX=${PREFIX} MAKE_FLAGS+= PYTHON=${PYTHONBIN} MAKE_FLAGS+= MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR} # Even if converters/pandoc is installed, pretend as if it weren't. MAKE_FLAGS+= PANDOC= REPLACE_BASH+= lib/cmd/bup-import-rdiff-backup REPLACE_BASH+= dev/checksum REPLACE_BASH+= dev/compare-trees REPLACE_BASH+= dev/configure-sampledata REPLACE_BASH+= dev/force-delete REPLACE_BASH+= dev/git-cat-tree REPLACE_BASH+= dev/perf-glance REPLACE_BASH+= dev/prep-for-debianish-build REPLACE_BASH+= dev/prep-for-macos-build REPLACE_BASH+= dev/refresh REPLACE_BASH+= dev/sync-tree REPLACE_BASH+= dev/system-info REPLACE_BASH+= dev/update-checkout-info REPLACE_BASH+= dev/update-doc-branches REPLACE_BASH+= dev/validate-python REPLACE_BASH+= pylint REPLACE_BASH+= test/ext/test-cat-file REPLACE_BASH+= test/ext/test-command-without-init-fails REPLACE_BASH+= test/ext/test-comparative-split-join REPLACE_BASH+= test/ext/test-compression REPLACE_BASH+= test/ext/test-drecurse REPLACE_BASH+= test/ext/test-fsck REPLACE_BASH+= test/ext/test-fuse REPLACE_BASH+= test/ext/test-gc REPLACE_BASH+= test/ext/test-help REPLACE_BASH+= test/ext/test-import-duplicity REPLACE_BASH+= test/ext/test-import-rdiff-backup REPLACE_BASH+= test/ext/test-index REPLACE_BASH+= test/ext/test-index-check-device REPLACE_BASH+= test/ext/test-index-clear REPLACE_BASH+= test/ext/test-index-save-type-change REPLACE_BASH+= test/ext/test-list-idx REPLACE_BASH+= test/ext/test-ls REPLACE_BASH+= test/ext/test-ls-remote REPLACE_BASH+= test/ext/test-main REPLACE_BASH+= test/ext/test-meta REPLACE_BASH+= test/ext/test-misc REPLACE_BASH+= test/ext/test-on REPLACE_BASH+= test/ext/test-packsizelimit REPLACE_BASH+= test/ext/test-redundant-saves REPLACE_BASH+= test/ext/test-release-archive REPLACE_BASH+= test/ext/test-restore-map-owner REPLACE_BASH+= test/ext/test-restore-single-file REPLACE_BASH+= test/ext/test-rm REPLACE_BASH+= test/ext/test-rm-between-index-and-save REPLACE_BASH+= test/ext/test-save-creates-no-unrefs REPLACE_BASH+= test/ext/test-save-data-race REPLACE_BASH+= test/ext/test-save-errors REPLACE_BASH+= test/ext/test-save-restore REPLACE_BASH+= test/ext/test-save-restore-excludes REPLACE_BASH+= test/ext/test-save-smaller REPLACE_BASH+= test/ext/test-save-strip-graft REPLACE_BASH+= test/ext/test-save-symlink-race REPLACE_BASH+= test/ext/test-save-with-valid-parent REPLACE_BASH+= test/ext/test-sparse-files REPLACE_BASH+= test/ext/test-split-join REPLACE_BASH+= test/ext/test-tz REPLACE_BASH+= test/ext/test-web REPLACE_BASH+= test/ext/test-xdev REPLACE_BASH+= .sh DOCDIR= share/doc/${PKGBASE} INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${DOCDIR} post-install: ${INSTALL_DATA} ${DIST_MANPAGES}/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 ${INSTALL_DATA} ${WRKSRC}/DESIGN ${DESTDIR}${PREFIX}/${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/${DOCDIR} .include "options.mk" # \todo Investigate "bup ftp" crash with NetBSD editline and resolve. .include "../../devel/readline/buildlink3.mk" .include "../../lang/python/application.mk" .include "../../mk/bsd.pkg.mk"