[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / bup

File: [cvs.NetBSD.org] / pkgsrc / sysutils / bup / Makefile (download)

Revision 1.39, Thu Nov 21 16:19:05 2019 UTC (10 months ago) by gdt
Branch: MAIN
Changes since 1.38: +24 -7 lines

sysutils/bup: Workarounds for dealing with haskell, github, github.mk

github.mk presumes that there is one distfile, but bup has two because
it uses pandoc which uses haskell.  Set variables that should result
in fetching both of them.  Because this does not work, I have put a
copy of the man tarball at MASTER_SITE_BACKUP.

(No PKGREVISION++ because if you had the distfiles before you'll get
the same binary package now.)

# $NetBSD: Makefile,v 1.39 2019/11/21 16:19:05 gdt Exp $

DISTNAME=	bup-0.30
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.

# We would like to fetch the following files:
#   https://github.com/bup/bup/archive/0.30.tar.gz
#   https://github.com/bup/bup/archive/28876cde4a3dac518e773860aa7969c106f5390d.tar.gz
# We use a subdir to isolate the man distfile that is named with a
# SHA1, so that one can readily understand to which package the file
# belongs.
DIST_SUBDIR=	bup		

# This should not be necessary, as it is defaulted by github.mk, but
# that only works if DISTFILES is empty.
DISTFILES+=	${DISTNAME}${EXTRACT_SUFX}

# The SITES assignment does not work, perhaps because it is overridden
# elsewhere.  As a workaround, the distfile is at
# ${MASTER_SITE_BACKUP}.
# \todo Fix fetching.
MAN_TAG=	28876cde4a3dac518e773860aa7969c106f5390d
MAN_UNPACK=	bup-${MAN_TAG}
MAN_DISTFILE=	${MAN_TAG}${EXTRACT_SUFX}
SITES.${MAN_DISTFILE}=	${MASTER_SITES:=${GITHUB_PROJECT}/archive/${MAN_DISTFILE}}
DISTFILES+=	${MAN_DISTFILE}

# Upstream provides html, but we choose not to include it in the package.
#HTML_TARBALL=	66eccb7eb49575d006d193276018d9551ac5b4d4

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

DEPENDS+=	par2-[0-9]*:../../archivers/par2
DEPENDS+=	${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
DEPENDS+=	${PYPKGPREFIX}-tornado-[0-9]*:../../www/py-tornado
DEPENDS+=	git-base-[0-9]*:../../devel/git-base

# TEST_DEPENDS
BUILD_DEPENDS+=	rsync-[0-9]*:../../net/rsync

PYTHON_VERSIONS_ACCEPTED=	27	# py-fuse-bindings

DOCDIR=		${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

MAKE_FLAGS+=	PREFIX=${PREFIX}
MAKE_FLAGS+=	PYTHON=${PYTHONBIN}
MAKE_FLAGS+=	MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}

USE_TOOLS+=		bash gmake perl:run
REPLACE_PERL+=		wvtest

REPLACE_BASH+=		cmd/import-rdiff-backup-cmd.sh
REPLACE_BASH+=		t/compare-trees
REPLACE_BASH+=		t/configure-sampledata
REPLACE_BASH+=		t/force-delete
REPLACE_BASH+=		t/subtree-hash
REPLACE_BASH+=		t/test-cat-file.sh
REPLACE_BASH+=		t/test-command-without-init-fails.sh
REPLACE_BASH+=		t/test-index-check-device.sh
REPLACE_BASH+=		t/test-meta.sh
REPLACE_BASH+=		t/test-redundant-saves.sh
REPLACE_BASH+=		t/test-restore-single-file.sh
REPLACE_BASH+=		t/test-rm-between-index-and-save.sh
REPLACE_BASH+=		t/test-save-creates-no-unrefs.sh
REPLACE_BASH+=		t/test.sh
REPLACE_BASH+=		wvtest-bup.sh

INSTALLATION_DIRS+=	${PKGMANDIR}/man1 share/doc/${PKGBASE}

post-install:
	${INSTALL_DATA} ${DOCDIR}/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${INSTALL_DATA} ${WRKSRC}/DESIGN ${DESTDIR}${PREFIX}/share/doc/bup
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/bup

.include "options.mk"

.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"