summaryrefslogtreecommitdiff
path: root/devel/cvsync/Makefile
blob: a68fcda50ada0bbd9733cc4de1cfe944dabdaba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $NetBSD: Makefile,v 1.85 2010/01/17 12:02:12 wiz Exp $
#

DISTNAME=	cvsync-0.24.19
PKGREVISION=	3
CATEGORIES=	devel scm
MASTER_SITES=	ftp://ftp.cvsync.org/pub/cvsync/

MAINTAINER=	gehenna@NetBSD.org
HOMEPAGE=	http://www.cvsync.org/
COMMENT=	Portable incremental cvs repository syncer

PKG_INSTALLATION_TYPES=	overwrite pkgviews
PKG_DESTDIR_SUPPORT=	user-destdir

USE_TOOLS+=	gmake
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 share/examples/cvsync

MAKE_ENV+=	BINOWN=${BINOWN:Q} BINGRP=${BINGRP:Q} BINMODE=${BINMODE:Q}
MAKE_ENV+=	MANMODE=${MANMODE:Q}
MAKE_ENV+=	PTHREAD_TYPE=${PTHREAD_TYPE:Q}
MAKE_ENV+=	PTHREAD_PREFIX=${BUILDLINK_PREFIX.pthread}
MAKE_ENV+=	CVSYNC_DEFAULT_CONFIG="${PKG_SYSCONFDIR}/cvsync.conf"
MAKE_ENV+=	CVSYNCD_DEFAULT_CONFIG="${PKG_SYSCONFDIR}/cvsyncd.conf"

EGDIR=		${PREFIX}/share/examples/cvsync
CONF_FILES+=	${EGDIR}/cvsync.conf ${PKG_SYSCONFDIR}/cvsync.conf

.include "../../mk/bsd.prefs.mk"

PKG_OPTIONS_VAR=	PKG_OPTIONS.cvsync
PKG_SUPPORTED_OPTIONS=	libgcrypt mhash openssl
.if ${OPSYS} == "AIX" || ${OPSYS} == "BSDOS" || ${OPSYS} == "Darwin" || \
	${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
PKG_SUGGESTED_OPTIONS=	openssl
.else
PKG_SUPPORTED_OPTIONS+=	native
PKG_SUGGESTED_OPTIONS=	native
.endif
.include "../../mk/bsd.options.mk"

###
### Hash type
###
.if !empty(PKG_OPTIONS:Mlibgcrypt)
MAKE_ENV+=	HASH_TYPE="libgcyprt"
.include "../../security/libgcrypt/buildlink3.mk"
.elif !empty(PKG_OPTIONS:Mmhash)
MAKE_ENV+=	HASH_TYPE="mhash"
.include "../../security/mhash/buildlink3.mk"
.elif !empty(PKG_OPTIONS:Mnative)
MAKE_ENV+=	HASH_TYPE="native"
.elif !empty(PKG_OPTIONS:Mopenssl)
MAKE_ENV+=	HASH_TYPE="openssl"
.include "../../security/openssl/buildlink3.mk"
.endif

post-install:
	${INSTALL_DATA} ${WRKSRC}/samples/cvsync.conf ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/cvsyncd-FreeBSD.conf ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/cvsyncd-NetBSD.conf ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/cvsyncd-OpenBSD.conf ${DESTDIR}${EGDIR}

.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"