aboutsummaryrefslogtreecommitdiff
path: root/net/svnup/Makefile
blob: e0f0ebefaca373b7b970bffde3677da68f5f5abc (plain) (blame)
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
# $FreeBSD$

PORTNAME=	svnup
PORTVERSION=	1.0
CATEGORIES=	net
MASTER_SITES=	http://jcm.dsl.visi.com/freebsd/svnup/ \
		LOCAL/jgh/net/${PORTNAME}/

MAINTAINER=	jcm@visi.com
COMMENT=	Lightweight program to pull source from an Apache Subversion server

LICENSE=	BSD

LDFLAGS+=	-lmd -lssl
USE_XZ=	yes

MAN1=	${PORTNAME}.1
MAN5=	${PORTNAME}.conf.5
PORTDOCS=	ChangeLog

NO_STAGE=	yes
post-patch-script:
	@${REINPLACE_CMD} -e 's|8.3|${OSREL}|' ${WRKSRC}/svnup.conf

do-build:
	cd ${WRKSRC} && \
		${CC} -o ${PORTNAME} ${CFLAGS} ${PORTNAME}.c ${LDFLAGS}

.include <bsd.port.options.mk>

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MAN1PREFIX}/man/man1
	${INSTALL_MAN} ${WRKSRC}/${MAN5} ${MAN5PREFIX}/man/man5

post-install:
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}
.endif
	@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
	@if [ ! -e "${PREFIX}/etc/${PORTNAME}.conf" ]; then \
		${ECHO_MSG} "   Installing local configuration file: ${PREFIX}/etc/${PORTNAME}.conf"; \
		${CP} ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf; \
	else \
		${ECHO_MSG} "   Preserving local configuration file: ${ETCDIR}/${PORTNAME}.conf"; \
	fi

.include <bsd.port.mk>