Edgewall Software
Last modified 4 years ago Last modified on Jan 31, 2008 11:00:39 PM

Trac on Slackware 12.0

The above instruction tells about deploying trac on Slackware Linux 12.0.

Prerequisites

This software must be installed:

  • d/python
  • d/subversion
  • l/neon
  • n/httpd
  • l/arp
  • checkinstall (1.6.0, if you use 1.6.1, don't forget to add —install=yes into it's options list)

Installing software

SQLite

Build and install:

configure --prefix=/usr --sysconfdir=/etc
make
checkinstall --type=slackware --arch=i686 --pkgname=sqlite --pkgrelease=trac1 --default

pysqlite

Build and install:

python setup.py build
python setup.py install

SWIG

Build and install:

configure --prefix=/usr --sysconfdir=/etc
make
checkinstall --type=slackware --arch=i686 --pkgname=swig --pkgrelease=trac1 --default

Subversion

Subversion package need to be rebuilt to enable SWIG.

  • Grab sources and SlackBuild of original package (see source/d/subversion).
  • Patch subversion.SlackBuild:
    • subversion.SlackBuild

      old new  
      55 
      66VERSION=1.4.4 
      77ARCH=${ARCH:-i486} 
      8 BUILD=1 
       8BUILD=trac1 
       9 
       10PYTHON_VER=2.5 
      911 
      1012if [ "$ARCH" = "i386" ]; then 
      1113  SLKCFLAGS="-O2 -march=i386 -mcpu=i686" 
       
      4749  --with-pic \ 
      4850  --with-ssl \ 
      4951  --with-zlib \ 
       52  --with-swig \ 
       53  --enable-swig-bindings=python \ 
      5054  --build=$ARCH-slackware-linux 
      5155make -j4 || exit 1 
       56make swig-py 
      5257make install DESTDIR=$PKG 
       58make install-swig-py DESTDIR=$PKG 
      5359make install-docs DESTDIR=$PKG 
      5460 
      5561( cd $PKG 
       
      8288  -exec chmod 644 {} \; 
      8389)  
      8490 
       91mkdir -p $PKG/usr/lib/python$PYTHON_VER/site-packages 
       92cp -R $PKG/usr/lib/svn-python/libsvn $PKG/usr/lib/python$PYTHON_VER/site-packages 
       93cp -R $PKG/usr/lib/svn-python/svn $PKG/usr/lib/python$PYTHON_VER/site-packages 
       94 
      8595mkdir -p $PKG/install 
      8696cat $CWD/slack-desc > $PKG/install/slack-desc 
  • Run subversion.SlackBuild
  • Go to /tmp
  • Perform
    upgradepkg subversion-1.4.4-i486-trac1.tgz
    

Note that version number and package revision can be different.

pycxx

Build and install: {{ python setup.py install }}

pysvn

Since Slackware lacks some crypto libraries, it's neccessary to patch Source/setup.py first:

  • ./Source/setup.

    old new  
    300300-lsvn_client-1 \ 
    301301-lsvn_diff-1 \ 
    302302-lsvn_repos-1 \ 
    303  -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lexpat -lneon 
     303-lcom_err -lresolv -lexpat -lneon 
    304304 
    305305#include pysvn_common.mak 
    306306''' 

Build and install:

cd Source
pyhton setup.py configure ; make
mkdir /usr/lib/python2.5/site-packages/pysvn
cp pysvn/__init__.py pysvn/_pysvn_2_5.so /usr/lib/python2.5/site-packages/pysvn

Clearsilver

Build and install:

configure --prefix=/usr --sysconfdir=/etc --with-python=/usr/bin/python --without-ruby --without-java --without-csharp
make
checkinstall --type=slackware --arch=i686 --pkgname=clearsilver --pkgrelease=trac1 --default

Note: if make fails, try changing —without-* to —disable-*. So, your configure command may look like

configure --prefix=/usr --sysconfdir=/etc --with-python=/usr/bin/python --disable-ruby --disable-java --disable-csharp

trac

Build and install:

python setup.py build
python setup.py install
ldconfig

mod_python (optional)

Build and install:

configure --prefix=/usr --sysconfdir=/etc --with-apxs=/usr/sbin/apxs
make
checkinstall --type=slackware --arch=i686 --pkgname=mod_python --pkgrelease=trac1 --default

Don't forget to add the following into /etc/httpd/httpd.conf:

LoadModule python_module lib/httpd/modules/mod_python.so

Notes on Python Modules

  • Check whether all the modules are installed into /usr/lib/python2.5/site-packages
  • Check whether /usr/lib/python is a symlink to /usr/lib/python2.5

Configuring

Configuration of trac on Slackware is the same as for other Linux distros, there is no peculiarity:

  • Configure trac environment
  • Configure Apache