updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / openlp-bzr / PKGBUILD
blob1df4bca20e0d87bf61a71628bf683719aeb43c68
1 # Maintainer: Garrett <floft.net/contact>
2 pkgname=openlp-bzr
3 pkgver=1776
4 pkgrel=3
5 pkgdesc="Church presentation software (development version)."
6 arch=('any')
7 url='http://openlp.org/'
8 provides=('openlp')
9 conflicts=('openlp')
10 license=('GPLv2')
11 makedepends=('bzr')
12 depends=('qt' 'python2' 'python2-pyqt' 'python2-distribute' 'phonon' 'python2-chardet'
13         'python-lxml' 'python-beautifulsoup' 'python2-sqlalchemy' 'python2-sip'
14         'python-pysqlite-legacy' 'python2-pyenchant' 'python-mako' 'python2-migrate')
15 optdepends=('libreoffice-impress: display impress presentations')
16 install=openlp.install
17 source=(openlp.sh)
18 md5sums=('bb78637dd085de567dc8aea8699939bf')
19 sha256sums=('c85060eeb512410b8b9b9a3a638c70006f45ded0e4b551fc7135fdcd2ff915d5')
21 _bzrtrunk=lp:openlp
22 _bzrmod=openlp
24 build() {
25   cd "$srcdir"
26   
27   if [ ! -d "./$_bzrmod" ]; then
28     bzr co "$_bzrtrunk" "$_bzrmod"
29   else
30     bzr up "$_bzrmod"
31   fi
32   
33   [ -d "./$_bzrmod-build" ] && rm -rf "./$_bzrmod-build"
34   cp -r "./$_bzrmod" "./$_bzrmod-build"
35   
36   cd "$srcdir/$_bzrmod-build"
37   python2 setup.py build
38   python2 setup.py install --root="$pkgdir/" --optimize=1
39   mv "$pkgdir/usr/bin/openlp"{.pyw,}
40   
41   echo "$pkgver" > "$pkgdir/usr/lib/python2.7/site-packages/openlp/.version"
43   install -Dm0755 "$srcdir/openlp.sh" "$pkgdir/etc/profile.d/openlp.sh"
44   install -Dm0644 "resources/openlp.desktop" "$pkgdir/usr/share/applications/openlp.desktop"
45   install -Dm0644 "resources/images/openlp-logo.svg" "$pkgdir/usr/share/pixmaps/openlp.svg"
46   install -Dm0644 "resources/images/openlp-logo-48x48.png" "$pkgdir/usr/share/pixmaps/openlp.png"
48   #translations
49   tsrcdir="resources/i18n"
50   tdestdir="$pkgdir/usr/share/$pkgname/i18n"
51   mkdir -p "$tdestdir"
52   cd "$tsrcdir"
53   
54   for file in *.ts; do
55     lconvert -i "$file" -o "$tdestdir/${file%%ts}qm"
56   done