updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / bitten-svn / PKGBUILD
blob138816abcf9d2031c460d9a08bc393cc36ffb908
1 # Maintainer: J. Berger <jeberger@free.fr>
2 pkgname=bitten-svn
3 pkgver=987
4 pkgrel=1
5 pkgdesc="A continuous integration plugin for Trac"
6 arch=(i686 x86_64)
7 url="http://bitten.edgewall.org"
8 license="BSD"
9 depends="trac>=0.11"
10 patches=('bitten-cunit.patch' 'bitten-cunit-traceback.patch' 'bitten-cppcheck.patch' 'bitten-errorsasfailures.patch')
11 source=("${patches[@]}" "bitten-slave")
12 md5sums=('56c5c7694c845f99c6cd65dd086467f6'
13          '3ace395a188d8e5bfe6919a799707705'
14          'f7c7689e448d9308b0e7316918055a57'
15          'a82ca5a71fe32a34f92aeee2740c60d0'
16          '17425458fc6b00e51abfbc75b6ee0fc0')
18 _svntrunk=http://svn.edgewall.org/repos/bitten/trunk/
19 _svnmod=bitten
21 build() {
22    cd "$srcdir"
24    msg "Preparing the sources"
26    if [ -d "$_svnmod/.svn" ]; then
27       svn up "$_svnmod" -r "$pkgver" || return 1
29       warning "Local patches were not re-applied!"
30    else
31       svn co "$_svntrunk" -r "$pkgver" "$_svnmod" || return 1
33       msg "Applying patches"
34       cd "$_svnmod"
35       for p in ${patches[@]}; do
36          patch -p1 < "$startdir/$p" || return 1
37       done
38    fi
40    cd "$srcdir/$_svnmod"
41    msg "Building the Python Egg"
42    python2 setup.py bdist_egg || return 1
44    msg "Installing"
45    PY_VERSION=$(python2 -c 'import distutils.sysconfig as cfg; print cfg.get_config_var ("VERSION")')
46    python2 setup.py install --root="$startdir/pkg" || return 1
48    install -Dm 644 "dist/Bitten-0.7dev_r${pkgver}-py${PY_VERSION}.egg" "$startdir/pkg/usr/lib/bitten/Bitten-r$pkgver-$pkgrel.egg"
49    install -Dm 755 "$srcdir/bitten-slave" "$pkgdir/etc/rc.d/bitten-slave"