# New ports collection makefile for:    ports-common
# Date created:                         2007-09-24
# Whom:                                 SW-Soft
# OS Version:                           6.1
#
# $FreeBSD: ports/swsoft/ports-common/Makefile 8.2.1 2007/09/24 22:33:43 SWSoft Exp $
#

PORTNAME= psa
PORTVERSION= 8.2.1 
CATEGORIES= swsoft 

COMMENT= "Common Makefile for Plesk"

VALID_CATEGORIES+= swsoft 

OPTIONS=  PSA 		"Base packages of Plesk" "on"
OPTIONS+= ASP 		"Apache ASP support" "off"
OPTIONS+= MAILMAN 	"Mailman mailing list manager support" "off"
OPTIONS+= PGSQL 	"PosgreSQL server support" "off"
OPTIONS+= TOMCAT 	"Tomcat Java Servlets support" "off" 
OPTIONS+= SPAM 		"SpamAssassin support" "off"
OPTIONS+= HORDE 	"Additional Horde components for Plesk" "off"
OPTIONS+= MANUALS	"Additional Plesk manuals" "off"
OPTIONS+= BACKUP 	"Backup utilities" "off"
OPTIONS+= DRWEB 	"DrWeb antivirus" "off"
OPTIONS+= PPWSE 	"Plesk Professional Web Site Editor" "off" 
OPTIONS+= API 		"Plesk API former Plesk Agent" "off"
OPTIONS+= SSHTERM 	"SSH Terminal java applet" "off"
OPTIONS+= PMM 		"Migration manager" "off" 
OPTIONS+= FIREWALL 	"Firewall module" "off" 
OPTIONS+= KAV	 	"Kaspersky antivirus module" "off"
OPTIONS+= VPN 		"VPN module" "off"
OPTIONS+= FILESERVER	"Fileserver module and SMB file server package" "off"
OPTIONS+= WATCHDOG 	"System monitoring module" "off"
OPTIONS+= SBM		"Sitebuilder module for Plesk" "off"
OPTIONS+= SB_PUBLISH	"SiteBuilder publishing support for Plesk" "off"
OPTIONS+= APPVAULT	"Application vault" "off"
OPTIONS+= RUBY_RAILS	"Ruby on Rails support" "off"
OPTIONS+= MOD_FCGID	"mod_fcgid module for apache server" "off"
OPTIONS+= QMAIL_RBL	"SPAM blocker for QMail daemon" "off"

.include <bsd.port.pre.mk>

.if defined(WITH_PSA)
SUBDIR+= psa
SUBDIR+= psa-php-configurator
SUBDIR+= psa-api-rpc
SUBDIR+= psa-horde
.endif

.if defined(WITH_ASP)
SUBDIR+= psa-apacheasp
.endif 

.if defined(WITH_MAILMAN)
SUBDIR+= psa-mailman-configurator
.endif 

.if defined(WITH_PGSQL)
SUBDIR+= psa-postgresql-configurator
.endif 

.if defined(WITH_TOMCAT)
SUBDIR+= psa-tomcat-configurator
.endif 

.if defined(WITH_SPAM)
SUBDIR+= psa-spamassassin
.endif 

.if defined(WITH_HORDE)
SUBDIR+= psa-imp
SUBDIR+= psa-ingo
SUBDIR+= psa-kronolith
SUBDIR+= psa-mnemo
SUBDIR+= psa-turba
SUBDIR+= psa-mimp 
SUBDIR+= psa-passwd
.endif 

.if defined(WITH_MANUALS)
SUBDIR+= psa-manual-custom-skin-guide
.endif 

.if defined(WITH_BACKUP)
SUBDIR+= psa-backup-manager
.endif 

.if defined(WITH_DRWEB)
SUBDIR+= psa-drweb-qmail
.endif 

.if defined(WITH_PPWSE)
SUBDIR+= psa-ppwse
.endif 

.if defined(WITH_API)
SUBDIR+= psa-api-rpc
.endif 

.if defined(WITH_SSHTERM)
SUBDIR+= psa-sshterm
.endif 

.if defined(WITH_PMM)
SUBDIR+= psa-migration-manager
.endif 

.if defined(WITH_FIREWALL)
SUBDIR+= psa-module-firewall
.endif 

.if defined(WITH_KAV)
SUBDIR+= psa-module-kav
.endif

.if defined(WITH_CSTRIKE)
SUBDIR+= psa-module-cs-gs
.endif 

.if defined(WITH_VPN)
SUBDIR+= psa-module-vpn
.endif 

.if defined(WITH_WATCHDOG)
SUBDIR+= psa-module-watchdog
.endif 

.if defined(WITH_FILESERVER)
SUBDIR+= psa-module-fileserver
.endif 

.if defined(WITH_SBM)
SUBDIR+= psa-sbm3
.endif 

.if defined(WITH_SB_PUBLISH)
SUBDIR+= psa-sb-publish
.endif 

.if defined(WITH_MIVA)
SUBDIR+= psa-miva
.endif

.if defined(WITH_APPVAULT)
SUBDIR+= psa-appvault
.endif

.if defined(WITH_RUBY_RAILS)
WITH_MOD_FCGID=1
SUBDIR+= psa-rubyrails-configurator
.endif

.if defined(WITH_MOD_FCGID)
SUBDIR+= psa-mod-fcgid-configurator
.endif

.if defined(WITH_QMAIL_RBL)
SUBDIR+= psa-qmail-rblsmtpd
.endif

install sw-install: index
.	for i in ${SUBDIR}
		cd ${PORTSDIR}/${CATEGORIES}/${i} && make sw-install || true
.	endfor

test-ports sw-test-ports:
.       for i in ${SUBDIR}
		@cd ${PORTSDIR}/${CATEGORIES}/${i} && make sw-test-ports
.       endfor

index: 
	@echo -n "==> Making indexes of Plesk ports.. "
	@${CP} -f ${INDEXDIR}/${INDEXFILE} ${INDEXDIR}/${INDEXFILE}.bkp 2>/dev/null || true
	@for i in `find ${.CURDIR} -type d -depth 1`; do \
                cd $$i && make index >/dev/null 2>&1 || true; \
	done
	@echo "done"

clean:
.	for i in ${SUBDIR}
	@cd ${PORTSDIR}/${CATEGORIES}/${i} && make clean
.	endfor
	@rm -rf ${PORTSDIR}/${CATEGORIES}/work

.include <bsd.port.post.mk>

