summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b06707b8cf541737a5cebeb5d1d4c170f1adf338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: ValHue <vhuelamo at gmail dot com>
# https://github.com/ValHue/AUR-PKGBUILDs
#
# Contributor: Jaroslav Lichtblau <dragonlord at aur dot archlinux dot org>
# Contributor: Daniel J Griffiths <ghost1227 at archlinux dot us>
# Contributor: Ronald van Haren <ronald at archlinux dot org>
# Contributor: Alessio 'mOLOk' Bolognino <themolok at gmail dot com>
# Contributor: Pawel Rusinek <p.rusinek at gmail dot com>

pkgname="griffith"
pkgver=0.13
pkgrel=9
pkgdesc="Movie collection manager application"
arch=('any')
url="http://www.griffith.cc/"
license=('GPL2')
depends=('pygtk>=2.14.1' 'sqlite' 'python2-pysqlite' \
         'python2-reportlab>=2.3' 'python2-pillow' 'python2-sqlalchemy')
optdepends=('python2-psycopg2: postgreSQL support'
            'mysql-python: MySQL support'
            'python2-chardet: encoding detection of imported CSV files'
            'python2-gtkspell: spell checking support'
            'griffith-extra-artwork: additional icons')
source=("http://launchpad.net/${pkgname}/trunk/0.13/+download/${pkgname}-${pkgver}.tar.gz"
        "https://raw.githubusercontent.com/ValHue/AUR-PKGBUILDs/master/griffith/validators.py"
		"http://www.strits.dk/files/PluginMovieIMDB.py")
sha256sums=('60576d33aa855ab45d654288d7bf2ead8accecb72fd2acbc373656294ab8f242'
            'f5e0b43c6ee56148b55cc650599c96b7774491867d38b47278bc121bf33fb9af'
            '7184164f5902878350e319caf977079d1ac15babe754a0b5da91f6125dce6348')

build() {
    cd "${pkgname}-${pkgver}"

    # python2 fix
    sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' griffith

    # new bash_completion directory
    #sed -e 's,BASHCOMPDIR = $\(ETCDIR\)/bash_completion.d,BASHCOMPDIR = $\(PREFIX\)/share/bash-completion/completions,' -i Makefile
    sed -e 's,BASHCOMPDIR = $(ETCDIR)/bash_completion.d,BASHCOMPDIR = $(PREFIX)/share/bash-completion/completions,' -i Makefile

    # The version 0.13.0 of griffith isn't compatible with SqlAlchemy 0.8.
    # http://forum.griffith.cc/index.php/topic,1601.msg5317.html#msg5317
    cp -f ../validators.py ./lib/db/validators.py

	# Update PluginMovieIMDB.py to version 1.15. Thanks to Strit
	# http://www.strits.dk/files/PluginMovieIMDB.py
	cp -f ../PluginMovieIMDB.py ./lib/plugins/movie/PluginMovieIMDB.py
}

package() {
    cd "${pkgname}-${pkgver}"

    make DESTDIR=${pkgdir} install

    # The program creates a wrong symlink so make a new one
    rm ${pkgdir}/usr/bin/griffith
    ln -s /usr/share/griffith/lib/griffith ${pkgdir}/usr/bin/griffith 
}