aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/dtc/Makefile
blob: 377ad5613d029315b156d072856cabd677138173 (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
137
138
139
140
141
142
143
144
145
146
# Ports collection makefile for:    dtc
# Date created:             1 December 2003
# Whom:                 Frederic Cambus & Thomas Goirand & Marc G. Fournier
#
# $FreeBSD$
#

PORTNAME=   dtc
PORTVERSION=    0.32.0.1
CATEGORIES= sysutils
MASTER_SITES=   ftp://ftp.gplhost.sg/pub/dtc/bsd/ \
        ftp://qala-sg.apt-proxy.gplhost.sg/pub/dtc/bsd/ \
        ftp://601.apt-proxy.gplhost.com/pub/dtc/bsd/ \
        ftp://seattle.apt-proxy.gplhost.com/pub/dtc/bsd/ \
        ftp://ftp.gplhost.com/pub/dtc/bsd/ \
        ftp://ftp.gplhost.co.uk/pub/dtc/bsd/ \
        ftp://ftp.gplhost.fr/pub/dtc/bsd/ \
        ftp://972.apt-proxy.gplhost.com/pub/dtc/bsd/ \
        http://ftp.gplhost.fr/pub/dtc/bsd/

MAINTAINER= fkiernan@id.net.ar
COMMENT=    A hosting web GUI for admin and accounting all hosting services

RUN_DEPENDS=    ${LOCALBASE}/${APACHEMODDIR}/mod_log_sql.so:${PORTSDIR}/www/mod_log_sql2-dtc \
        ${LOCALBASE}/share/pear/Crypt/CBC.php:${PORTSDIR}/security/pear-Crypt_CBC \
        ${LOCALBASE}/share/pear/XML/Serializer.php:${PORTSDIR}/devel/pear-XML_Serializer \
        ${LOCALBASE}/share/pear/Net/IPv4.php:${PORTSDIR}/net/pear-Net_IPv4 \
        ${LOCALBASE}/www/cgi-bin/sbox:${PORTSDIR}/www/sbox-dtc \
        ${LOCALBASE}/bin/sudo:${PORTSDIR}/security/sudo \
        ${LOCALBASE}/lib/nss_mysql.so:${PORTSDIR}/net/libnss-mysql \
        ${LOCALBASE}/sbin/chrootuid:${PORTSDIR}/security/chrootuid \
        ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
        ${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf \
        ${X11BASE}/lib/X11/fonts/bitstream-vera/Vera.ttf:${PORTSDIR}/x11-fonts/bitstream-vera \
        ${X11BASE}/lib/X11/fonts/webfonts/verdana.ttf:${PORTSDIR}/x11-fonts/webfonts \
        ${LOCALBASE}/bin/mhonarc:${PORTSDIR}/www/mhonarc \
        ${LOCALBASE}/bin/mlmmj-list:${PORTSDIR}/mail/mlmmj \
        ${LOCALBASE}/bin/ncftpput:${PORTSDIR}/ftp/ncftp3 \
        ${LOCALBASE}/bin/rrdtool:${PORTSDIR}/databases/rrdtool \
        ${LOCALBASE}/sbin/logrotate:${PORTSDIR}/sysutils/logrotate \
        ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash

CONFLICTS=  dtc-toaster-[0-9]* dtc-postfix-courier-[0-9]*

USE_GETTEXT=    yes

USE_GMAKE=  yes

USE_MYSQL=  server

NO_BUILD=   yes
USE_PHP=    mysql pcre session
MAN8=       dtc-chroot-shell.8
MANCOMPRESSED=  no
USE_APACHE_RUN= 2.2+

.if defined(WITH_PHP5)
DEFAULT_PHP_VER=5
IGNORE_WITH_PHP=4
RUN_DEPENDS+=   ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear
USE_PHP+=   bz2 gd mbstring mcrypt mysql mysqli openssl pcre \
        session sockets xml zlib curl
.endif

.if defined(WITH_WEBALIZER)
RUN_DEPENDS+=   ${LOCALBASE}/bin/webalizer:${PORTSDIR}/www/webalizer
.endif

.if defined(WITH_AWSTATS)
RUN_DEPENDS+=   ${LOCALBASE}/www/awstats:${PORTSDIR}/www/awstats
.endif

.if defined(WITH_VISITORS)
RUN_DEPENDS+=   ${LOCALBASE}/bin/visitors:${PORTSDIR}/www/visitors
.endif

.if defined(WITH_PUREFTPD)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/pure-ftpd:${PORTSDIR}/ftp/pure-ftpd
.elif defined(WITH_PROFTPD)
RUN_DEPENDS+=   proftpd-mysql>=0:${PORTSDIR}/ftp/proftpd-mysql
.endif

.if defined(WITH_POSTFIX)
RUN_DEPENDS+=   ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix
.endif
.if defined(WITH_CYRUS_IMAPD)
RUN_DEPENDS+=   ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd23
.elif defined(WITH_COURIER_IMAP)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/pop3login:${PORTSDIR}/mail/courier-imap \
        ${LOCALBASE}/lib/courier-authlib/libauthmysql.a:${PORTSDIR}/databases/courier-authlib-mysql
.endif

.if defined(WITH_MAILDROP)
RUN_DEPENDS+=   ${LOCALBASE}/bin/maildrop:${PORTSDIR}/mail/maildrop
.endif

.if defined(WITH_CYRUS_SASL2)
RUN_DEPENDS+=   ${LOCALBASE}/lib/sasl2/libcrammd5.so:${PORTSDIR}/security/cyrus-sasl2
.endif

.if defined(WITH_SPAMASSASSIN)
RUN_DEPENDS+=   ${LOCALBASE}/bin/spamd:${PORTSDIR}/mail/p5-Mail-SpamAssassin
.endif

.if defined(WITH_CLAMAV)
RUN_DEPENDS+=   ${LOCALBASE}/bin/clamdscan:${PORTSDIR}/security/clamav
.endif

.if defined(WITH_AMAVIS)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/amavisd:${PORTSDIR}/security/amavisd-new
.endif

.if defined(WITH_SQUIRRELMAIL)
RUN_DEPENDS+=   ${LOCALBASE}/www/squirrelmail/src/login.php:${PORTSDIR}/mail/squirrelmail
.endif

.if defined(WITH_PHPMYADMIN)
RUN_DEPENDS+=   ${LOCALBASE}/www/phpMyAdmin/index.php:${PORTSDIR}/databases/phpmyadmin
.endif

.if defined(WITH_APACHE)
USE_APACHE= 2.2+
.endif

.if defined(WITH_DOVECOT)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/dovecot:${PORTSDIR}/mail/dovecot
.endif

.if defined(WITH_FREERADIUS)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/radiusd:${PORTSDIR}/net/freeradius2
.endif

SUB_FILES=  dtc-install dtc-deinstall
SUB_LIST+=  WWWDIR="${WWWDIR}" QMAIL_DIR="${QMAIL_DIR}"

.include <bsd.port.pre.mk>

do-install:
    @${INSTALL_SCRIPT} ${WRKDIR}/dtc-install ${PREFIX}/sbin/dtc-install
    @${INSTALL_SCRIPT} ${WRKDIR}/dtc-deinstall ${PREFIX}/sbin/dtc-deinstall
    @${GMAKE} -C ${WRKSRC} install-dtc-common INSTALL=install \
        DTC_APP_DIR=${WWWDIR} DTC_GEN_DIR=${PREFIX}/var/dtc CONFIG_DIR=${PREFIX}/etc DTC_ETC_DIRECTORY=${ETCDIR} \
        DTC_DOC_DIR=${DOCSDIR} MANUAL_DIR=${MANPREFIX}/man BIN_DIR=${PREFIX}/bin UNIX_TYPE=bsd VERS=0.32.0
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>