# $Id: Portfile 67630 2010-05-15 09:29:21Z ryandesign@macports.org $

PortSystem 1.0

name			gallery
version			2.3
categories		www
maintainers		gmail.com:ckieffer

description		Gallery is a web based photo album written using PHP
long_description	Gallery is a web based software product that lets you manage your \
			photos on your own website. You must have your own website with PHP \
			support in order to install and use it. With Gallery you can easily \
			create and maintain albums of photos via an intuitive interface. Photo \
			management includes automatic thumbnail creation, image resizing, \
			rotation, ordering, captioning, searching and more. Albums can have \
			read, write and caption permissions per individual authenticated user \
			for an additional level of privacy. Give accounts to your friends and \
			family and let them upload and manage their own photos on your \
			website!

homepage		http://gallery.menalto.com
master_sites		sourceforge
distname		gallery-${version}-full
checksums		md5 f85663db5f1de99d0b3bc13929f9ab39 \
				sha1 585e9530aeb4f44f198c7d430fe458d461c743bb
platforms		darwin freebsd

depends_run		port:jhead \
			port:netpbm \
			port:unzip \
			port:ImageMagick \
			port:expat \
			port:fontconfig \
			port:ghostscript \
			port:jasper \
			port:jbigkit \
			port:lcms \
			port:libiconv \
			port:libxml2 \
			port:mpeg2vidcodec \
			path:bin/perl:perl5 \
			port:pkgconfig \
			port:libpng \
			port:tiff
	
depends_lib		port:apache2 path:bin/php:php5 path:bin/mysql_config5:mysql5		

variant apache {
	depends_lib-append	port:apache
	depends_lib-delete	port:apache2
}

variant php4 {
	depends_lib-append	port:php4
	depends_lib-delete	path:bin/php:php5
}

variant mysql4 conflicts postgresql7 postgresql8 {
	depends_lib-append	port:mysql4
	depends_lib-delete	path:bin/mysql_config5:mysql5
}

variant postgresql7 conflicts mysql4 mysql5 postgresql8 {
	depends_lib-append	port:postgresql7
	depends_lib-delete	path:bin/mysql_config5:mysql5
}

variant postgresql8 conflicts mysql4 mysql5 postgresql7 {
	depends_lib-append	port:postgresql80
	depends_lib-delete	path:bin/mysql_config5:mysql5
}

use_configure   no
build 		{}

set docpath ${destroot}${prefix}/www/data/gallery
     
destroot {
	xinstall -m 755 -d ${destroot}${prefix}/www/data/gallery
	eval file copy [glob ${workpath}/gallery2/*] ${docpath} 
}
