aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/condor/Makefile
blob: 50a64193dd783cd52d0206c6368e362bf526ca40 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# New ports collection makefile for:    condor
# Date created:         01 May 2007
# Whom:             Andy Pavlo
#
# $FreeBSD$
#

PORTNAME=   condor
PORTVERSION=    7.0.0
CATEGORIES= sysutils parallel
MASTER_SITES=   http://www.cs.wisc.edu/condor/cgi-bin/downloads/sendfile.pl/freebsd-${OSREL}/v7.0/
DISTNAME=   condor_src-${PORTVERSION}-all-all

MAINTAINER= pavlo@cs.wisc.edu
COMMENT=    Condor High-Throughput Distributed Batch System

BUILD_DEPENDS=  gtar:${PORTSDIR}/archivers/gtar

ONLY_FOR_ARCHS= amd64 i386
WRKSRC=     ${WRKDIR}/condor_src-${PORTVERSION}/src/
OPTIONS=    SUBMIT_NODE "Configure system to be able to submit jobs" On \
        EXECUTE_NODE "Configure system to execute jobs in pool" On \
        MANAGER_NODE "Configure system as central manager node" On
USE_AUTOTOOLS=  autoconf:261:env
USE_BISON=  build
USE_GMAKE=  yes
USE_LDCONFIG=   yes
USE_PERL5_BUILD=    yes

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 600000
BROKEN=     Does not compile
.endif

.if ${ARCH} == "amd64" && ${OSVERSION} >= 700000
BROKEN=     Does not compile
.endif

.if defined(WITHOUT_SUBMIT_NODE)
INSTALL_SUBMIT_NODE=
.else
INSTALL_SUBMIT_NODE=    submit,
.endif
.if defined(WITHOUT_EXECUTE_NODE)
INSTALL_EXECUTE_NODE=
.else
INSTALL_EXECUTE_NODE=   execute,
.endif

.if defined(WITHOUT_MANAGER_NODE)
INSTALL_MANAGER_NODE=
.else
INSTALL_MANAGER_NODE=   manager,
.endif

# Where Condor will store files it needs
LOCAL_DIR=  ${DEST_DIR}/var/${PORTNAME}

pre-everything::
    @( ${ECHO_MSG} ""; \
       ${ECHO_MSG} "WARNING: Condor needs approximately 5GB to build!"; \
       ${ECHO_MSG} "         Please make sure your build environment has that much before continuing."; \
       ${ECHO_MSG} "" )

pre-configure:
    cd ${WRKSRC} && ./build_init

do-configure:
    cd ${WRKSRC} && ./configure --with-soft-is-hard

do-build:
    cd ${WRKSRC} && ${GMAKE} public

pre-install:
    ${MKDIR} ${LOCAL_DIR}/execute
    ${MKDIR} ${LOCAL_DIR}/spool
    ${MKDIR} ${LOCAL_DIR}/log
    ${CP} ${WRKSRC}condor_scripts/condor_configure ${WRKSRC}

do-install:
    ${WRKSRC}/condor_configure --type=${INSTALL_SUBMIT_NODE}${INSTALL_EXECUTE_NODE}${INSTALL_MANAGER_NODE} --install=${WRKSRC}release_dir --install-dir=${PREFIX} --local-dir=${LOCAL_DIR} --maybe-daemon-owner --overwrite
    ${MV} ${PREFIX}/etc/examples/ ${PREFIX}/etc/condor_config.examples
    ${PERL} -pi -e "s|^HOSTALLOW_WRITE = .*|HOSTALLOW_WRITE = *|" ${PREFIX}/etc/condor_config
    ${PERL} -pi -e "s|^MASTER=.*|MASTER=${PREFIX}/sbin/condor_master|" ${PREFIX}/etc/condor_config.examples/condor.boot
    ${PERL} -pi -e "s|^PS=.*|PS=\"ps aux\"|" ${PREFIX}/etc/condor_config.examples/condor.boot
    ${CP} ${PREFIX}/etc/condor_config.examples/condor.boot ${PREFIX}/etc/rc.d/condor

post-install:
    ${CAT} ${PKGMESSAGE}
    @( ${ECHO_MSG} ""; \
       ${ECHO_MSG} "Set the following parameter in your environment:"; \
       ${ECHO_MSG} "CONDOR_CONFIG = ${PREFIX}/etc/condor_config"; \
       ${ECHO_MSG} ""; \
       ${ECHO_MSG} "Sample configuration files may be found in ${PREFIX}/etc/condor_config.examples/"; \
       ${ECHO_MSG} ""; \
       ${ECHO_MSG} "Condor can be started with the following command:"; \
       ${ECHO_MSG} "${PREFIX}/etc/rc.d/condor start"; \
       ${ECHO_MSG} "" )

MAN1=       condor_advertise.1 \
        condor_checkpoint.1 \
        condor_compile.1 \
        condor_config_val.1 \
        condor_configure.1 \
        condor_findhost.1 \
        condor_glidein.1 \
        condor_history.1 \
        condor_hold.1 \
        condor_master.1 \
        condor_master_off.1 \
        condor_off.1 \
        condor_on.1 \
        condor_preen.1 \
        condor_prio.1 \
        condor_q.1 \
        condor_qedit.1 \
        condor_reconfig.1 \
        condor_reconfig_schedd.1 \
        condor_release.1 \
        condor_reschedule.1 \
        condor_restart.1 \
        condor_rm.1 \
        condor_run.1 \
        condor_stats.1 \
        condor_status.1 \
        condor_store_cred.1 \
        condor_submit.1 \
        condor_submit_dag.1 \
        condor_updates_stats.1 \
        condor_userlog.1 \
        condor_userprio.1 \
        condor_vacate.1 \
        condor_vacate_job.1

.include <bsd.port.post.mk>