# $Id: Portfile 80637 2011-07-16 02:49:31Z dluke@macports.org $

PortSystem 1.0
PortGroup python26 1.0

name			trac
version			0.12.2
categories		devel python
platforms		darwin
maintainers		geeklair.net:dluke
description		Wiki and issue tracking system.
# modified BSD, see http://trac.edgewall.org/wiki/TracLicense
license			BSD

long_description	Trac is an enhanced wiki and issue tracking system for \
			software development projects. Trac uses a minimalistic approach to \
			web-based software project management.

homepage	http://projects.edgewall.com/trac/
master_sites	http://ftp.edgewall.com/pub/trac/
distname	Trac-${version}

checksums	md5	f70c7676601f2592bcb7871319e62dd7 \
		sha1	95ca75b54abfd5a3d838f300c19ef8dbd125f08d \
		rmd160	317d5792976bc4c048cbac2a831398e976251110
		
depends_lib	port:subversion-python26bindings \
		port:python26 port:sqlite3 \
		port:py26-pygments port:py26-genshi \
		port:py26-babel port:py26-sqlite

notes		"See http://projects.edgewall.com/trac/wiki/TracInstall for information on setting up a new trac environment."

variant postgres description {Build with postgresql support instead of sqlite} {
				depends_lib-delete port:sqlite3 port:py26-sqlite
				depends_lib-append port:py26-psycopg2 port:py26-mx-base
			}

variant mysql description {Build with mysql support instead of sqlite} {
				depends_lib-delete port:sqlite3 port:py26-sqlite
				depends_lib-append port:py26-mysql

				ui_msg "Warning: MySQL support is currently experimental. That means it works for some people, but several issues remain, in particular regarding the use of unicode and the key length in the repository cache."
				ui_msg "See http://trac.edgewall.org/wiki/MySqlDb for more detailed information."
			}

post-destroot	{
			file mkdir ${destroot}${prefix}/share/trac/
			file copy ${worksrcpath}/contrib \
				${destroot}${prefix}/share/trac/contrib
			system "ln -sf ${frameworks_dir}/Python.framework/Versions/2.6/bin/trac-admin \
				${destroot}${prefix}/bin/trac-admin"
			system "ln -sf ${frameworks_dir}/Python.framework/Versions/2.6/bin/tracd \
				${destroot}${prefix}/bin/tracd"
		}
