Contents
Trac on Slackware 12.0
The following instructions are a guide to deploying Trac (pre-v1.4) on 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:
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 needs to be rebuilt to enable SWIG.
- Grab sources and SlackBuild of original package (see source/d/subversion).
- Patch subversion.SlackBuild:
-
subversion.SlackBuild
old new 5 5 6 6 VERSION=1.4.4 7 7 ARCH=${ARCH:-i486} 8 BUILD=1 8 BUILD=trac1 9 10 PYTHON_VER=2.5 9 11 10 12 if [ "$ARCH" = "i386" ]; then 11 13 SLKCFLAGS="-O2 -march=i386 -mcpu=i686" … … 47 49 --with-pic \ 48 50 --with-ssl \ 49 51 --with-zlib \ 52 --with-swig \ 53 --enable-swig-bindings=python \ 50 54 --build=$ARCH-slackware-linux 51 55 make -j4 || exit 1 56 make swig-py 52 57 make install DESTDIR=$PKG 58 make install-swig-py DESTDIR=$PKG 53 59 make install-docs DESTDIR=$PKG 54 60 55 61 ( cd $PKG … … 82 88 -exec chmod 644 {} \; 83 89 ) 84 90 91 mkdir -p $PKG/usr/lib/python$PYTHON_VER/site-packages 92 cp -R $PKG/usr/lib/svn-python/libsvn $PKG/usr/lib/python$PYTHON_VER/site-packages 93 cp -R $PKG/usr/lib/svn-python/svn $PKG/usr/lib/python$PYTHON_VER/site-packages 94 85 95 mkdir -p $PKG/install 86 96 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:
python setup.py install
pysvn
Since Slackware lacks some crypto libraries, it's neccessary to patch Source/setup.py first:
-
./Source/setup.
old new 300 300 -lsvn_client-1 \ 301 301 -lsvn_diff-1 \ 302 302 -lsvn_repos-1 \ 303 -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support-lcom_err -lresolv -lexpat -lneon303 -lcom_err -lresolv -lexpat -lneon 304 304 305 305 #include pysvn_common.mak 306 306 '''
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 distributions:
- Configure Trac environment.
- Configure Apache.
These instructions are described in TracInstall.