summaryrefslogtreecommitdiff
path: root/astro/squeuer/Makefile
blob: 099ed82e7a6d86b21f924575f9c7ec8638e74a1b (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
50
# New ports collection makefile for:	squeuer
# Date created:		6 August 2003
# Whom:			glewis@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=	squeuer
PORTVERSION=	2.0.2
CATEGORIES=	astro net
MASTER_SITES=	http://www.eyesbeyond.com/squeuer/

MAINTAINER=	glewis@FreeBSD.org
COMMENT=	A queueing proxy for Seti@Home

NO_BUILD=	yes
USE_REINPLACE=	yes
USE_PERL5_RUN=	yes

# These must be writeable by the user "squeuer"
SPOOLDIR?=	/var/spool/squeuer
LOGDIR?=	/var/spool/squeuer
PIDDIR?=	/var/spool/squeuer

do-configure:
	for i in ${WRKSRC}/etc/squeuer.conf.unix ${WRKSRC}/etc/rc.d/S71squeuer.sh; do \
		${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" \
			-e "s:%%SPOOLDIR%%:${SPOOLDIR}:g" \
			-e "s:%%LOGDIR%%:${LOGDIR}:g" \
			-e "s:%%PIDDIR%%:${PIDDIR}:g" $$i; \
	done

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/bin/squeuer.pl ${PREFIX}/sbin/squeuer
	${INSTALL_DATA} ${WRKSRC}/etc/squeuer.conf.unix ${PREFIX}/etc/squeuer.conf.sample
	${INSTALL_SCRIPT} ${WRKSRC}/etc/rc.d/S71squeuer.sh ${PREFIX}/etc/rc.d/squeuer.sh.sample
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/README ${WRKSRC}/doc/TODO ${DOCSDIR}
.endif

post-install:
	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
	if [ ! -e ${SPOOLDIR} ]; then \
		${MKDIR} ${SPOOLDIR}; \
		${CHOWN} squeuer:squeuer ${SPOOLDIR}; \
	fi
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>