[[PageOutline(2-5,Contents,pullout)]] = Trac on Slackware 12.0 The following instructions are a guide to deploying Trac (pre-v1.4) on [http://www.slackware.com/ Slackware]. This was tested on Slackware 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 its options list) == Installing software === SQLite Build and install: {{{#!sh configure --prefix=/usr --sysconfdir=/etc make checkinstall --type=slackware --arch=i686 --pkgname=sqlite --pkgrelease=trac1 --default }}} === pysqlite Build and install: {{{#!sh python setup.py build python setup.py install }}} === SWIG Build and install: {{{#!sh configure --prefix=/usr --sysconfdir=/etc make checkinstall --type=slackware --arch=i686 --pkgname=swig --pkgrelease=trac1 --default }}} === Subversion Subversion package needs to be rebuilt to enable SWIG. * Grab sources and !SlackBuild of original package (see source/d/subversion). * Patch subversion.!SlackBuild: {{{ #!diff --- subversion.SlackBuild 2007-07-23 17:11:46.000000000 +0700 +++ subversion.SlackBuild.trac 2007-07-26 13:30:21.000000000 +0700 @@ -5,7 +5,9 @@ VERSION=1.4.4 ARCH=${ARCH:-i486} -BUILD=1 +BUILD=trac1 + +PYTHON_VER=2.5 if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" @@ -47,9 +49,13 @@ --with-pic \ --with-ssl \ --with-zlib \ + --with-swig \ + --enable-swig-bindings=python \ --build=$ARCH-slackware-linux make -j4 || exit 1 +make swig-py make install DESTDIR=$PKG +make install-swig-py DESTDIR=$PKG make install-docs DESTDIR=$PKG ( cd $PKG @@ -82,6 +88,10 @@ -exec chmod 644 {} \; ) +mkdir -p $PKG/usr/lib/python$PYTHON_VER/site-packages +cp -R $PKG/usr/lib/svn-python/libsvn $PKG/usr/lib/python$PYTHON_VER/site-packages +cp -R $PKG/usr/lib/svn-python/svn $PKG/usr/lib/python$PYTHON_VER/site-packages + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc }}} * Run subversion.!SlackBuild * Go to /tmp * Perform {{{ upgradepkg subversion-1.4.4-i486-trac1.tgz }}} Note that the version number and package revision can be different. === pycxx Build and install: {{{#!sh python setup.py install }}} === pysvn Since Slackware lacks some crypto libraries, it's neccessary to patch Source/setup.py first: {{{ #!diff --- ./Source/setup.py-old 2007-05-30 19:56:04.000000000 +0700 +++ ./Source/setup.py 2007-05-30 19:56:12.000000000 +0700 @@ -300,7 +300,7 @@ -lsvn_client-1 \ -lsvn_diff-1 \ -lsvn_repos-1 \ - -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lexpat -lneon +-lcom_err -lresolv -lexpat -lneon #include pysvn_common.mak ''' }}} 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: {{{#!sh 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: {{{#!sh configure --prefix=/usr --sysconfdir=/etc --with-python=/usr/bin/python --disable-ruby --disable-java --disable-csharp }}} === Trac Build and install: {{{#!sh python setup.py build python setup.py install ldconfig }}} === mod_python (optional) Build and install: {{{#!sh 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`: {{{#!apache 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 distributions: * Configure Trac environment. * Configure Apache. These instructions are described in TracInstall.