
## Subversion & Trac - using "Virtual Python"
## 
## by Mark Biggers, biggers@utsl.com
##

#mkdir trac_sites

cd /usr/local/src/Python


## ---- "install" a virtual-python

# get Virtual Python from PEAK site
wget -q http://peak.telecommunity.com/dist/virtual-python.py

python2.4 virtual-python.py -v --no-site-packages \
                               --prefix=trac_sites

cd trac_sites
ls

## ---- install SetupTools and ... Easy Install!

alias py=$PWD/bin/python
wget http://peak.telecommunity.com/dist/ez_setup.py

py ez_setup.py -U setuptools

# ... alias for Easy Install! (unpack "zipped" eggs)
alias easy_i="$PWD/bin/easy_install -U -Z"


## ---- install Trac 0.11dev

# install dependencies: for Trac 0.11 or newer ... 
# SEE  http://trac.edgewall.org/wiki/TracOnWindows/Python2.5

easy_i genshi
easy_i pysqlite

# see what you've done
clear
ls -1rt lib/python2.4/site-packages/  

svn checkout http://svn.edgewall.org/repos/trac/trunk/  trac_trunk
cd trac_trunk
py setup.py install


## ---- making Trac 0.11dev work ... "Work, Trac, Work!"

TRAC_PROJ=trac_utsl

# create a auth-digest file, and admin user (Apache2 'htdigest')
htdigest -c auth.digest  utsl.com my_admin  ## my_pass

# create a Trac instance ...
bin/trac-admin $TRAC_PROJ initenv

    Project Name [My Project]> Use the Source, Luke
    Database connection string [sqlite:db/trac.db]>
    Repository type [svn]>
    Path to repository [/path/to/repos]> /usr/local/src/repository_svn


# give 'my_admin' all permissions
bin/trac-admin $TRAC_PROJ permission add my_admin TRAC_ADMIN

bin/tracd -p 2090 --auth=trac_utsl,auth.digest,utsl.com  $TRAC_PROJ


  Warning:

  You should install the SVN bindings

  ---------------------------------------------------------------------
  Project environment for 'Use the Source, Luke' created.

  You may now configure the environment by editing the file:

    /usr/local/src/Python/trac_sites/trac_utsl/conf/trac.ini

  If you'd like to take this new project environment for a test drive,
  try running the Trac standalone web server `tracd`:

    tracd --port 8000 /usr/local/src/Python/trac_sites/trac_utsl

  Then point your browser to http://localhost:8000/trac_utsl.
  There you can also browse the documentation for your installed
  version of Trac, including information on further setup (such as
  deploying Trac to a real web server).

  The latest documentation can also always be found on the project
  website:

    http://trac.edgewall.org/

  Congratulations!


