# ports collection makefile for:        SiteBuilder
# Revision:                             06112310
# Version:                              3.0.2
# Whom:                                 SWSoft, Inc <info@swsoft.com>
#
# $FreeBSD: ports/plesk/sitebuilder/Makefile,v 1.1 2006/11/02 17:33:07 SWSoft Exp $
# $Id: Makefile.template,v 1.9 2006/11/22 09:19:44 ksteuck Exp $
#

PORTNAME= sitebuilder
PORTVERSION= 3.0.2
PORTREVISION=
CATEGORIES= swsoft
MASTER_SITES?= http://autoinstall.plesk.com/SiteBuilder/SiteBuilder_${PORTVERSION}/dist-pkg-FreeBSD-${OSREL}-i386/distfiles/ \
               http://autoinstall.plesk.com/SiteBuilder_${PORTVERSION}/dist-pkg-FreeBSD-${OSREL}-i386/distfiles/

MAINTAINER= admins@swsoft.com
COMMENT= SWsoft Sitebuilder V3

SB_RELEASE:=06112310

VERBOSE= yes
USE_PERL5_RUN=  yes
#USE_APACHE=    yes
USE_APACHE=    2.0+

#MASTER_SITES=   # none
#DISTFILES=	${DISTNAME}_build06112310.${EXTRACT_SUFX}
#EXTRACT_ONLY=   # none

PLIST_SUB+=     APACHE_INCLUDE_DIR=${LOCALBASE}/etc/apache2/Includes

#NO_EXTRACT= no
NO_BUILD= yes
#NO_SCRIPTS=     yes

#RUN_DEPENDS+=   ${LOCALBASE}/psa/version:${PORTSDIR}/swsoft/psa

LIB_DEPENDS=    expat.6:${PORTSDIR}/textproc/expat2
LIB_DEPENDS+=   xml2.5:${PORTSDIR}/textproc/libxml2
LIB_DEPENDS+=   curl.3:${PORTSDIR}/ftp/curl
LIB_DEPENDS+=   freetype.9:${PORTSDIR}/print/freetype2
LIB_DEPENDS+=   jpeg.9:${PORTSDIR}/graphics/jpeg
LIB_DEPENDS+=   png.5:${PORTSDIR}/graphics/png
LIB_DEPENDS+=   iconv.3:${PORTSDIR}/converters/iconv
LIB_DEPENDS+=   mysqlclient.14:${PORTSDIR}/databases/mysql41-client
LIB_DEPENDS+=   xslt.2:${PORTSDIR}/textproc/libxslt
LIB_DEPENDS+=   exslt.8:${PORTSDIR}/textproc/libxslt


RUN_DEPENDS=    ${LOCALBASE}/sbin/httpd:${PORTSDIR}/www/apache20/

.include <bsd.port.pre.mk>

#.if exists (${LOCALBASE}/psa/version)
#  RUN_DEPENDS+=   ${LOCALBASE}/psa/mysql/libexec/mysqld:${PORTSDIR}/swsoft/psa-mysql
#.else
  RUN_DEPENDS+=   ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql41-server
#.endif

.if exists (${LOCALBASE}/psa/version)
  RUN_DEPENDS+=   ${LOCALBASE}/psa/lib/perl5/site_perl/5.8.8/mach/auto/DBD/mysql/mysql.so:${PORTSDIR}/swsoft/psa-perl-modules
.else
  RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
  RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/auto/DBD/mysql/mysql.so:${PORTSDIR}/databases/p5-DBD-mysql
.endif

CONFLICTS += sitebuilder-3.0.1 \
	     sitebuilder-module-AreaMap-3.0.1 \
	     sitebuilder-module-Eshop-3.0.1 \
	     sitebuilder-module-Feedback-3.0.1 \
	     sitebuilder-module-FlashIntro-3.0.1 \
	     sitebuilder-module-Forum-3.0.1 \
	     sitebuilder-module-Guestbook-3.0.1 \
	     sitebuilder-module-Login-3.0.1 \
	     sitebuilder-module-RssReader-3.0.1 \
	     sitebuilder-module-Script-3.0.1 \
	     sitebuilder-module-Statistics-3.0.1 \
	     sitebuilder-module-Voting-3.0.1 \
	     sitebuilder-3.0.0 \
	     sitebuilder-module-AreaMap-3.0.0 \
	     sitebuilder-module-Eshop-3.0.0 \
	     sitebuilder-module-Feedback-3.0.0 \
	     sitebuilder-module-FlashIntro-3.0.0 \
	     sitebuilder-module-Forum-3.0.0 \
	     sitebuilder-module-Guestbook-3.0.0 \
	     sitebuilder-module-Login-3.0.0 \
	     sitebuilder-module-RssReader-3.0.0 \
	     sitebuilder-module-Script-3.0.0 \
	     sitebuilder-module-Statistics-3.0.0 \
	     sitebuilder-module-Voting-3.0.0 

#BUILD_DEPENDS= $RUN_DEPENDS

NO_CONFIGURE= yes

#pre-install:
#        PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

#post-install:
#	#(cd ${WRKDIR}/${PORTNAME}-${PORTVERSION} && find -d * \! -type d) | sort > pkg-plist
#	#(cd ${WRKDIR}/${PORTNAME}-${PORTVERSION} && find -d * -type d) | sort | sed -e 's#^#@dirrm #' >> pkg-plist
#	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <plesk.install.mk>
