summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 28a446f9897f88e6e4eb275b120ee089677e3488 (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
59
60
# Maintainer: Michael Lass <bevan@bi-co.net>
# Contributor: graysky <graysky AT archlinux DOT us>
# Contributor: Zuf <kontakt.zuf(at)gmail.com>

# This PKGBUILD is maintained on github:
# https://github.com/michaellass/AUR

pkgname=macrofusion
pkgver=0.7.4
pkgrel=5
pkgdesc="GUI to combine photos to get deeper DOF or HDR"
url="http://sourceforge.net/projects/macrofusion/"
depends=('python-cairo' 'python-gobject' 'python-pillow' 'perl-image-exiftool' 'enblend-enfuse' 'hugin' 'libgexiv2')
arch=('any')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}/${pkgname}_${pkgver}.orig.tar.gz"
        "01-specify-gi-versions.patch"
        "02-use-frombytes.patch")
license=('GPL')
install=$pkgname.install
sha256sums=('2d061f0a2e858c86ae700351cf9785bc7058938e02ce6fcf40b192fbb0b60b11'
            '7eb5ef4c3c3a86a5457d0b5aaef31318ab4101f720b7c79f4cdba770634db934'
            '73b11f7dee7f7002f6cf6bbd4c94e39ee255dbbbdaf29850d522347e28f79e6f')

prepare() {
    cd ${srcdir}/${pkgname}-${pkgver}

    # Add version specification to certain gi modules. When they are missing
    # this leads to warnings, or in some cases even to import errors.
    patch -p1 < ${srcdir}/01-specify-gi-versions.patch

    # Replace Image.fromstring with Image.frombytes to work with newer versions
    # of python-pillow. fromstring was deprecated for a long time and was only
    # an alias for fromstring anyway.
    patch -p1 < ${srcdir}/02-use-frombytes.patch
}

package() {
    # Installation is a bit tricky. See README and parts of the python script to see
    # where everything should go to. A makefile would have been nice.

    cd ${srcdir}/${pkgname}-${pkgver}

    # install ui descriptions
    install -dm755 $pkgdir/usr/share/mfusion/ui
    install -Dm644 ui/* $pkgdir/usr/share/mfusion/ui/

    # images have to be split up manually. Irghs...
    install -Dm644 images/logoSplash.png $pkgdir/usr/share/mfusion/images/logoSplash.png
    install -Dm644 images/$pkgname.png   $pkgdir/usr/share/pixmaps/$pkgname.png

    # actual python script and desktop file
    install -Dm755 $pkgname.py $pkgdir/usr/bin/$pkgname
    install -Dm644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop

    # for some languages there is localization available
    for locale in locale/*; do
        install -dm755 $pkgdir/usr/share/$locale/LC_MESSAGES
        install -Dm644 $locale/LC_MESSAGES/* $pkgdir/usr/share/$locale/LC_MESSAGES/
    done
}